<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>thoughts of a doug &#187; Perl5</title>
	<atom:link href="http://somethingdoug.com/thoughts/tag/perl5/feed/" rel="self" type="application/rss+xml" />
	<link>http://somethingdoug.com/thoughts</link>
	<description></description>
	<lastBuildDate>Fri, 21 Oct 2011 05:03:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The 6-Month Ruling</title>
		<link>http://somethingdoug.com/thoughts/2011/10/21/the-6-month-ruling/</link>
		<comments>http://somethingdoug.com/thoughts/2011/10/21/the-6-month-ruling/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 05:03:20 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Perl5]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/?p=293</guid>
		<description><![CDATA[Recently I have started going through all my CPAN modules one-by-one and getting any fixes that are in there out onto CPAN. Some have had bug fixes sitting in the repository for at least 1 year. Because of this, I&#8217;m thinking of giving myself a &#8220;6-month ruling&#8221; where I should probably release a new version [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have started going through all my CPAN modules one-by-one and getting any fixes that are in there out onto CPAN. Some have had bug fixes sitting in the repository for at least 1 year. Because of this, I&#8217;m thinking of giving myself a &#8220;6-month ruling&#8221; where I should probably release a new version of a module at least every 6 months. This should keep me from at least forgetting about publishing forgotten bug fixes in the repositories.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2011/10/21/the-6-month-ruling/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Should Perl Modules Default to Non-Blocking?</title>
		<link>http://somethingdoug.com/thoughts/2011/10/20/should-perl-modules-default-to-non-blocking/</link>
		<comments>http://somethingdoug.com/thoughts/2011/10/20/should-perl-modules-default-to-non-blocking/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 18:10:31 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[AnyEvent]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Perl5]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/?p=284</guid>
		<description><![CDATA[I have been thinking about possibly changing my modules and for the creation of new modules in the future to be non-blocking (like utilizing AnyEvent or something else generic). Typically these days my main work involves node.js, which emphases non-blocking (i.m.o). Then a post came up recently that made me think about this again (yes, [...]]]></description>
			<content:encoded><![CDATA[<p>I have been thinking about possibly changing my modules and for the creation of new modules in the future to be non-blocking (like utilizing <a href="https://metacpan.org/module/AnyEvent">AnyEvent</a> or something else generic). Typically these days my main work involves <a href="http://nodejs.org/">node.js</a>, which emphases non-blocking (i.m.o). Then a <a href="http://blogs.perl.org/users/philip_durbin/2011/10/perl-dropped-and-go-adopted-due-to-concurrency-issues-in-baconbird.html">post came up recently</a> that made me think about this again (yes, I know in this particular case non-blocking still would not have solved the issue here, which was, apparently, that the person did not want to use event-based programming, but it just reminded me on my thoughts on non-blocking).</p>
<p>The main thing with non-blocking is that if you want to use something that is blocking, it is harder to use that in a non-blocking environment unless you can shove that blocking behavior into a background thread and put an event wrapper around it. Also, a non-blocking module can always be used in a blocking way, so I think this makes it a win-win.</p>
<p>Note: By &#8220;default to non-blocking&#8221; I mean that they can behave in a non-blocking way, so the module can behave both blocking and non-blocking.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2011/10/20/should-perl-modules-default-to-non-blocking/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Net-TacacsPlus Perl Distribution</title>
		<link>http://somethingdoug.com/thoughts/2011/07/24/net-tacacsplus-perl-distribution/</link>
		<comments>http://somethingdoug.com/thoughts/2011/07/24/net-tacacsplus-perl-distribution/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 04:10:24 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Perl5]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/?p=272</guid>
		<description><![CDATA[Recently after submitting a few patches to the Net-TacacsPlus Perl distribution, I suggested to the maintainer, Jozef Kutej, that the POE pieces be split out of the distribution into their own distribution. I suggested this because I felt like the POE pieces were not used by enough of the Net-TacacsPlus users (plus in my use [...]]]></description>
			<content:encoded><![CDATA[<p>Recently after submitting a few patches to the <a href="http://search.cpan.org/dist/Net-TacacsPlus/">Net-TacacsPlus</a> Perl distribution, I suggested to the maintainer, <a href="http://search.cpan.org/~jkutej/">Jozef Kutej</a>, that the POE pieces be split out of the distribution into their own distribution. I suggested this because I felt like the POE pieces were not used by enough of the Net-TacacsPlus users (plus in my use of Net-TacacsPlus I wasn&#8217;t using POE, so I felt it was unnecessary to install POE and its requirements).</p>
<p>Anyhow, after splitting the repository into two separate distributions, Jozef uploaded a TRIAL and then granted me co-maintainer status on the Net-TacacsPlus distribution and I uploaded the new distribution, as well as the new <a href="http://search.cpan.org/dist/POE-Component-Server-TacacsPlus/">POE-Component-Server-TacacsPlus</a> distribution.</p>
<p>Nothing on the CPAN should be affected by this distribution split, but any code on the DarkPAN should be fine as long as the dependencies are marked on the modules they require instead of the base module on the distribution they depend on.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2011/07/24/net-tacacsplus-perl-distribution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CPAN Testers Metabase has a certificate</title>
		<link>http://somethingdoug.com/thoughts/2011/03/15/cpan-testers-metabase-has-a-certificate/</link>
		<comments>http://somethingdoug.com/thoughts/2011/03/15/cpan-testers-metabase-has-a-certificate/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 13:58:49 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Metabase]]></category>
		<category><![CDATA[Perl5]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/?p=253</guid>
		<description><![CDATA[As an update to my previous post, David Golden has posted an update that the certificate for metabase.cpantesters.org is now signed by a certificate authority that is included in Mozilla-CA! This means anyone who was using my hypothetical distribution as a work-around in the mean time should not only stop using it, but it will [...]]]></description>
			<content:encoded><![CDATA[<p>As an update to <a title="CPAN::Reporter, Transport::Metabase, and libwww-lwp 6" href="http://somethingdoug.com/thoughts/2011/03/13/cpanreporter-transportmetabase-and-libwww-lwp-6/">my previous post</a>, <a href="http://www.dagolden.com/index.php/1391/fixed-cpan-testers-reporting-with-lwp-6/">David Golden has posted an update</a> that the certificate for metabase.cpantesters.org is now signed by a certificate authority that is included in <a href="http://search.cpan.org/dist/Mozilla-CA/">Mozilla-CA</a>! This means anyone who was using my <a href="https://gist.github.com/867743">hypothetical distribution</a> as a work-around in the mean time should not only stop using it, but it will no longer connect as the certificate has changed! You&#8217;d end up with the following error:</p>
<pre>CPAN::Reporter: Test::Reporter: error from 'Test::Reporter::Transport::Metabase::CPANTesters:'
fact submission failed: Can't connect to metabase.cpantesters.org:443 (certificate verify failed) at C:\strawberry\perl\site\lib/Metabase/Client/Simple.pm line 111
...
        Test::Reporter::Transport::Metabase::CPANTesters::send('Test::Reporter::Transport::Metabase::CPANTesters=HASH(0x7a932b8)', 'Test::Reporter=HASH(0x62cb790)') called at C:\strawberry\perl\site\lib/Test/Reporter.pm line 279
...</pre>
<p>Simply modify your CPAN::Reporter configuration to use the standard Metabase transport with the CPAN Testers metabase URI. Here is a short script you can run to automatically update your configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/env perl</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> <span style="color: #cc66cc;">5.006</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> CPAN<span style="color: #339933;">::</span><span style="color: #006600;">Reporter</span><span style="color: #339933;">::</span><span style="color: #006600;">Config</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$config_file</span> <span style="color: #339933;">=</span> CPAN<span style="color: #339933;">::</span><span style="color: #006600;">Reporter</span><span style="color: #339933;">::</span><span style="color: #006600;">Config</span><span style="color: #339933;">::</span>_get_config_file<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$config</span> <span style="color: #339933;">=</span> CPAN<span style="color: #339933;">::</span><span style="color: #006600;">Reporter</span><span style="color: #339933;">::</span><span style="color: #006600;">Config</span><span style="color: #339933;">::</span>_open_config_file<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$class</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">%args</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #000066;">split</span> <span style="color: #000066;">m</span><span style="color: #009900;">&#123;</span>\<span style="color: #000066;">s</span><span style="color: #339933;">+</span><span style="color: #009900;">&#125;</span>mosx<span style="color: #339933;">,</span> <span style="color: #0000ff;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>_<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>transport<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$class</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">'Metabase::CPANTesters'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Modifying configuration file transport line from<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>_<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>transport<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;"># Correct the transport information</span>
    <span style="color: #0000ff;">$class</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'Metabase'</span><span style="color: #339933;">;</span>
    <span style="color: #0000ff;">$args</span><span style="color: #009900;">&#123;</span>uri<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'https://metabase.cpantesters.org/api/v1/'</span><span style="color: #339933;">;</span>
    <span style="color: #0000ff;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>_<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>transport<span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;$class &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000066;">join</span> <span style="color: #000066;">q</span><span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">%args</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;to<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>_<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>transport<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;"># Write the configuration</span>
    <span style="color: #0000ff;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">write</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$config_file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Done<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>_<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>transport<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;"># Modification does not look necessary</span>
    <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Leaving transport configuration set to<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$config</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>_<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>transport<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;"># Modification does not look like it should occur</span>
    <span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Not modifying configuration without transport directive<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066;">exit</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></pre></div></div>

<p>In order to be fully capable of submitting reports through CPAN::Reporter, be sure to have the following modules installed:</p>
<pre>IO::Socket::SSL
Mozilla::CA</pre>
<p>For a full uninstall of the hypothetical distribution, please see the <a href="https://gist.github.com/867743#file_uninstall">UNINSTALL</a> file now included with the distribution.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2011/03/15/cpan-testers-metabase-has-a-certificate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CPAN::Reporter, Transport::Metabase, and libwww-lwp 6</title>
		<link>http://somethingdoug.com/thoughts/2011/03/13/cpanreporter-transportmetabase-and-libwww-lwp-6/</link>
		<comments>http://somethingdoug.com/thoughts/2011/03/13/cpanreporter-transportmetabase-and-libwww-lwp-6/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 01:18:17 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Metabase]]></category>
		<category><![CDATA[Perl5]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/?p=234</guid>
		<description><![CDATA[Recently libwww-lwp-6.00 hit the CPAN with one major change in the default operating behavior: connecting using the https protocol would cause the certificate chain from the server to be verified that it was issued by a trusted certificate authority. In my opinion this behavior is a good thing, as this finally brings libwww-lwp in line [...]]]></description>
			<content:encoded><![CDATA[<p>Recently <a href="http://search.cpan.org/~gaas/libwww-perl-6.00/">libwww-lwp-6.00</a> hit the CPAN with one major change in the default operating behavior: connecting using the https protocol would cause the certificate chain from the server to be verified that it was issued by a trusted certificate authority. In my opinion this behavior is a good thing, as this finally brings libwww-lwp in line with all the browsers.</p>
<p>There were a few <a href="http://blogs.perl.org/users/randy_stauner/2011/03/cpanreporter-fails-to-send-through-metabase-with-new-lwp-6.html">blog</a> <a href="https://colinnewell.wordpress.com/2011/03/11/ssl-host-checking-and-lwpuseragent/">articles</a> where this change caught people by surprise in that submissions to the <a href="http://metabase.cpantesters.org/">CPAN Testers Metabase</a> failed (due to metabase.cpantesters.org using a self-signed certificate). Because metabase.cpantesters.org uses a self-signed certificate, simply installing <a href="http://search.cpan.org/perldoc?Mozilla::CA">Mozilla::CA</a>, which is a bundle of all the trusted CAs by Mozilla, will not correct the submissions failures (plus you have to install a few other modules). The typically error you will see once you have libwww-perl-6.00 install is as follows:</p>
<pre>CPAN::Reporter: Test::Reporter: error from 'Test::Reporter::Transport::Metabase:'
fact submission failed: Can't connect to metabase.cpantesters.org:443 (certificate verify failed) at C:\strawberry\perl\site\lib/Metabase/Client/Simple.pm line 111</pre>
<p>You may also see the following error if you do not have <a href="http://search.cpan.org/perldoc?IO::Socket::SSL">IO::Socket::SSL</a> installed:</p>
<pre>CPAN::Reporter: Test::Reporter: error from 'Test::Reporter::Transport::Metabase:'
fact submission failed: Can't connect to metabase.cpantesters.org:443 (Crypt-SSLeay can't verify hostnames) at C:\strawberry\perl\site\lib/Metabase/Client/Simple.pm line 111</pre>
<p>As a work-around for this problem (without just disabling certificate checking or other environment changes) I wrote two classes that subclass <a href="http://search.cpan.org/perldoc?Metabase::Client::Simple">Metabase::Client::Simple</a> and <a href="http://search.cpan.org/perldoc?Test::Reporter::Transport::Metabase">Test::Reporter::Transport::Metabase</a> that make them specific to submitting to the CPAN Testers Metabase and bundle the metabase.cpantesters.org certificate and check the certificate against the bundled one. Having a module where a certificate is bundled may or may not be what CPAN Testers Metabase wants, which is why I do not have any intentions on actually publishing this distribution. If you are interested in looking at it, you can view it as <a href="https://gist.github.com/867743">Github Gist 867743</a> (using the download button at the top results in the distribution tarball).</p>
<p>The premise is to subclass the Metabase transport to set the uri to be the CPAN Testers Metabase URI by default and to set the client to my client subclass. The client subclass simply wraps the <a href="http://search.cpan.org/perldoc?LWP::UserAgent">LWP::UserAgent</a> generation method and sets the SSL option to verify the certificate with the bundled certificate. This accomplished by this excerpt:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;">around _ua <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$orig</span> <span style="color: #339933;">=</span> <span style="color: #000066;">shift</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$self</span> <span style="color: #339933;">=</span> <span style="color: #000066;">shift</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ua_was_generated</span> <span style="color: #339933;">=</span> <span style="color: #339933;">!</span><span style="color: #0000ff;">$self</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>_ua<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;"># Get the standard generated UA</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ua</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$self</span><span style="color: #339933;">-&gt;</span><span style="color: #0000ff;">$orig</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@_</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$ua_was_generated</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;"># Add our SSL options to the UA</span>
        <span style="color: #0000ff;">$ua</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">ssl_opts</span><span style="color: #009900;">&#40;</span>SSL_ca_file <span style="color: #339933;">=&gt;</span> File<span style="color: #339933;">::</span><span style="color: #006600;">ShareDir</span><span style="color: #339933;">::</span><span style="color: #006600;">dist_file</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'Test-Reporter-Transport-Metabase-CPANTesters'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'metabase.cpantesters.org.crt'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000066;">return</span> <span style="color: #0000ff;">$ua</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>If you are interested in using the module, you can download the tarball and run the commands outlined in <a href="https://gist.github.com/867743#file_install">INSTALL</a> and be sure to change your CPAN Reporter configuration as noted in <a href="https://gist.github.com/867743#file_readme">README</a> to actually use the new module. After you install it, you can simply set your CPAN Reporter configuration file to have:</p>
<pre>transport = Metabase::CPANTesters id_file ~/.cpanreporter/metabase_id.json</pre>
<p>A possible solution to this situation may be for the Test::Reporter::Transport::Metabase to have an option for SSL parameters like the certificate file and pass that parameter on to Metabase::Client::Simple for it to set in it&#8217;s LWP::UserAgent instance (or metabase.cpantesters.org could have a certificate signed by a CA trusted by Mozilla, though this solution may cost money for the certificate purchase).</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2011/03/13/cpanreporter-transportmetabase-and-libwww-lwp-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Net::NSCA::Client Introduction</title>
		<link>http://somethingdoug.com/thoughts/2010/11/03/netnscaclient-introduction/</link>
		<comments>http://somethingdoug.com/thoughts/2010/11/03/netnscaclient-introduction/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 07:27:17 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Perl5]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/2010/11/03/netnscaclient-introduction/</guid>
		<description><![CDATA[I have realized that I’ve never announced my Perl module Net::NSCA::Client. This module was created to make it easy for Perl applications to report to a NSCA server. NSCA (which stands for NetSaint Check Acceptor) is not very good at it’s job, but there is no replacement for it that I am aware of (though [...]]]></description>
			<content:encoded><![CDATA[<p>I have realized that I’ve never announced my Perl module <a href="http://search.cpan.org/perldoc?Net::NSCA::Client">Net::NSCA::Client</a>. This module was created to make it easy for Perl applications to report to a NSCA server. NSCA (which stands for NetSaint Check Acceptor) is not very good at it’s job, but there is no replacement for it that I am aware of (though I hope to change this in the future).</p>
<p>I needed to be able to send reports back to NSCA easily from Perl programs (and without needing to go through the <code>send_nsca</code> program that comes with NSCA). I came across <a href="http://search.cpan.org/perldoc?Net%3A%3ANsca">Net::Nsca</a>, which mostly works, besides for the fact that I need to change the packet version in the code to 3 (which is not easy to do since it wasn’t made to be changed).</p>
<p>I decided to make my own NSCA client, using <a href="http://search.cpan.org/perldoc?Moose">Moose</a> and would be hopefully more flexible. A sort example of sending a report in some routine in a server would be:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">sub</span> nsca_heart_beat <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$self</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">@_</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #0000ff;">$self</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">nsca_client</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">send_report</span><span style="color: #009900;">&#40;</span>
        hostname <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$self</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">hostname</span><span style="color: #339933;">,</span>
        service  <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'server'</span><span style="color: #339933;">,</span>
        message  <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Running'</span><span style="color: #339933;">,</span>
        status   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$Net</span><span style="color: #339933;">::</span><span style="color: #006600;">NSCA</span><span style="color: #339933;">::</span><span style="color: #006600;">Client</span><span style="color: #339933;">::</span><span style="color: #006600;">STATUS_OK</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066;">return</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This is good and all, but not really a killer feature by any means. What really is a winner here is the <a href="http://search.cpan.org/perldoc?Net::NSCA::Client::ServerConfig">Net::NSCA::Client::ServerConfig</a> class that was added in version 0.007. One of the biggest problems with NSCA is that what is sent over the network is not portable. Yes, the data is made to be aligned in network order, but it actually sends a native C structure over the network. The problem is what happens when the server and client happen to compile different structures? This is what ServerConfig is for. It also makes it easy if it any of the constants defined in the NSCA source files were changed when NSCA was built. This client is the only one of the currently three others on the CPAN to support this.</p>
<p>I’ve currently been working on this module in my spare time and coming up is support for encryption methods besides XOR (like AES) as well as complete support for the standard <code>send_nsca.cfg</code> configuration file, plus much more.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2010/11/03/netnscaclient-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strawberry Perl, patch.exe and UAC</title>
		<link>http://somethingdoug.com/thoughts/2010/04/26/strawberry-perl-patch-exe-and-uac/</link>
		<comments>http://somethingdoug.com/thoughts/2010/04/26/strawberry-perl-patch-exe-and-uac/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 05:29:11 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Perl5]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/?p=180</guid>
		<description><![CDATA[I work a lot with Perl 5 under Windows and have loved Strawberry Perl so much. I&#8217;ve been using ActiveState&#8217;s ActivePerl since 2001 and welcomed the UNIX-like experience Strawberry Perl gave me, especially because it was sometimes very hard to get some modules for ActivePerl. Anyhow, in Windows Vista and up the User Account Control [...]]]></description>
			<content:encoded><![CDATA[<p>I work a lot with Perl 5 under Windows and have loved <a href="http://strawberryperl.com/">Strawberry Perl</a> so much. I&#8217;ve been using ActiveState&#8217;s <a href="http://www.activestate.com/activeperl/">ActivePerl</a> since 2001 and welcomed the UNIX-like experience Strawberry Perl gave me, especially because it was sometimes very hard to get some modules for ActivePerl.</p>
<p>Anyhow, in Windows Vista and up the User Account Control feature has a backwards-compatibility feature where for programs that don&#8217;t contain manifest files (presumably because they aren&#8217;t UAC-aware) Windows will look at certain characteristics of the file to determine if it needs Administrative privileges to run properly. One of the ways it determines this is by file name. The utility that comes with the C tool chain in Strawberry Perl <code>patch.exe</code> triggers this detection mechanism because of the word &#8220;patch&#8221; in the file name. Because of this it is pretty much impossible to install modules like <code>Math::Pari</code> that make use of the patch.exe program.</p>
<p>A few days ago I saw a new development release of <a href="http://search.cpan.org/dist/Win32-Exe/">Win32::Exe</a> (0.12_03) was released and saw it supported viewing and modifying of embedded manifests! I decided to use this on the patch.exe file in Strawberry Perl to set the required privilege level to asInvoker (so that UAC is not needed) and it worked! Though you no longer need to do this for the April 2010 and up Strawberry Perl releases, anyone running an older version and not planning to upgrade soon may want to modify their path.exe with the following commands:</p>
<p><code>C:\> cpan MDOOTSON/Win32-Exe-0.12_03.tar.gz<br />
C:\> perl -MWin32::Exe -e "$e=Win32::Exe->new('c:/strawberry/c/bin/patch.exe'); $m=$e->get_manifest; $m->set_execution_level('asInvoker'); $e->set_manifest($m); $e->write;"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2010/04/26/strawberry-perl-patch-exe-and-uac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Important Bug Fix in Authen::CAS::External 0.06</title>
		<link>http://somethingdoug.com/thoughts/2010/04/08/important-bug-fix-in-authen-cas-external-0-06/</link>
		<comments>http://somethingdoug.com/thoughts/2010/04/08/important-bug-fix-in-authen-cas-external-0-06/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 02:32:30 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Perl5]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/?p=174</guid>
		<description><![CDATA[Earlier today I released an important bug fix to my distribution Authen-CAS-External (under version 0.06). The bug caused the distribution to fail on CAS deployments where the application was not deployed at the root URL (i.e. https://cas.domain.com/login worked fine, but https://cas.domain.com/cas/login did not work at all). The reason was because the LWP::UserAgent handler rules had [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier today I released an important bug fix to my distribution <a href="http://search.cpan.org/dist/Authen-CAS-External/">Authen-CAS-External</a> (under version 0.06). The bug caused the distribution to fail on CAS deployments where the application was not deployed at the root URL (i.e. https://cas.domain.com/login worked fine, but https://cas.domain.com/cas/login did not work at all). The reason was because the LWP::UserAgent handler rules had <code>m_path_match</code> set to a static <code>qr{\A /login}msx</code>, which clearly would only match pages where <code>login</code> was at the root, which is not always the case. This was fixed by storing the path to login in the variable <code>$cas_path</code> and then changing the path match to <code>qr{\A \Q$cas_path\E}msx</code>. Note the <code>\Q</code> and <code>\E</code> are important so that the regular expression properly treats the path as a static string. The full patch can be seen in <a href="http://github.com/dougwilson/perl5-authen-cas-external/commit/df8ef3b03bfff370ac44e68bb72b6086987b5ca0">commit df8ef3b</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2010/04/08/important-bug-fix-in-authen-cas-external-0-06/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Big Updates to Nagios::Plugin::OverHTTP</title>
		<link>http://somethingdoug.com/thoughts/2010/04/07/big-updates-to-nagios-plugin-overhttp/</link>
		<comments>http://somethingdoug.com/thoughts/2010/04/07/big-updates-to-nagios-plugin-overhttp/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 16:48:53 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Perl5]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/?p=172</guid>
		<description><![CDATA[I was contacted by Peter van Eijk who was interested in getting performance data support added to Nagios-Plugin-OverHTTP and I quickly moved to add it in. Version 0.14 added performance data support and a major overhaul was made to the class layout. I was inspired by the layout of Plack and thought that it was [...]]]></description>
			<content:encoded><![CDATA[<p>I was contacted by Peter van Eijk who was interested in getting performance data support added to <a href="http://search.cpan.org/dist/Nagios-Plugin-OverHTTP/">Nagios-Plugin-OverHTTP</a> and I quickly moved to add it in. Version 0.14 added performance data support and a major overhaul was made to the class layout. I was inspired by the layout of <a href="http://search.cpan.org/dist/Plack/">Plack</a> and thought that it was a great layout for a pluggable system. I hope to a &#8220;builder&#8221; class similar to <a href="http://search.cpan.org/perldoc?Plack::Builder">Plack::Builder</a> so users can create all kinds of plugins based off Nagios-Plugin-OverHTTP. As soon as the builder class comes out, I will created a very detailed post on the greatness of this plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2010/04/07/big-updates-to-nagios-plugin-overhttp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CPAN Bug Tracking</title>
		<link>http://somethingdoug.com/thoughts/2010/02/09/cpan-bug-tracking/</link>
		<comments>http://somethingdoug.com/thoughts/2010/02/09/cpan-bug-tracking/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 17:18:38 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Perl5]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/?p=166</guid>
		<description><![CDATA[Recently I have been adding my own bug list and todo list to the RT queue of my CPAN modules to track them and help me remember over a longer period of time. I also figure that if they are visible to everyone, perhaps someone may help fix or add a feature.]]></description>
			<content:encoded><![CDATA[<p>Recently I have been adding my own bug list and todo list to the RT queue of my CPAN modules to track them and help me remember over a longer period of time. I also figure that if they are visible to everyone, perhaps someone may help fix or add a feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2010/02/09/cpan-bug-tracking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

