<?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; cpan</title>
	<atom:link href="http://somethingdoug.com/thoughts/tag/cpan/feed/" rel="self" type="application/rss+xml" />
	<link>http://somethingdoug.com/thoughts</link>
	<description></description>
	<lastBuildDate>Mon, 26 Apr 2010 05:29:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<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>
		<item>
		<title>Nagios::Plugin::OverHTTP Planned Additions</title>
		<link>http://somethingdoug.com/thoughts/2010/02/05/nagios-plugin-overhttp-planned-additions/</link>
		<comments>http://somethingdoug.com/thoughts/2010/02/05/nagios-plugin-overhttp-planned-additions/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 22:12:25 +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=160</guid>
		<description><![CDATA[I usually get e-mails about my Nagios::Plugin::OverHTTP asking about little things being added here and there. The last e-mail I got was from Peter van Eijk asking for support for performance data. I looked over the code and realized that it really needs some refactoring before I can easily add support for performance data, and [...]]]></description>
			<content:encoded><![CDATA[<p>I usually get e-mails about my <a href="http://search.cpan.org/dist/Nagios-Plugin-OverHTTP/">Nagios::Plugin::OverHTTP</a> asking about little things being added here and there. The last e-mail I got was from Peter van Eijk asking for support for performance data. I looked over the code and realized that it really needs some refactoring before I can easily add support for performance data, and so I am currently hung up on that before the feature will get added.</p>
<p>My current thoughts on support for getting performance data from the remote page would be to just scrape it from the standard plugin output, which is supported as the body:</p>
<pre>PLUGIN OK - Good to go! | time=0.012s;1;10;10;0</pre>
<p>I was also thinking about how to add support for receiving as headers, since the other supported aspects of the plugin may be transmitted as headers. My current thoughts are for a header named <code>X-Nagios-Performance</code> which would hold the <code>name=value</code> pair, separated by spaces like the normal plugin and would also allow more than one header with the data to be present:</p>
<pre>X-Nagios-Performance: time=0.012s;1;10;10;0
X-Nagios-Performance: count=2;;;50;0 other=4;;;4;0</pre>
<p>For Nagios::Plugin::OverHTTP itself, since the remote plugin can provide critical and warning thresholds, I was thinking of allowing for actually changing the status based on that to be made optional by default (because if the remote plugin said the status was OK but yet a performance metric it sent said that it should really be in a WARNING state, by default Nagios would have kept that as OK so I believe that my plugin should honor that as well by default). New options for the plugin would be:</p>
<pre>--warning name=threshold
--critical name=threshold
--use-transmitted-thresholds
--override-transmitted-thresholds</pre>
<p>The last option <code>--override-transmitted-thresholds</code> would cause the performance data written as the plugin&#8217;s output to be changed to match the thresholds given as the plugin&#8217;s options. This means a plugin with the given options <code>--override-transmitted-thresholds --critical time=4</code> would cause the performance data to say <code>time=0.012s;1;4;10;0</code> instead of <code>time=0.012s;1;10;10;0</code> (note that this setting does not affect the decision of the final status code).</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2010/02/05/nagios-plugin-overhttp-planned-additions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test::Override::UserAgent</title>
		<link>http://somethingdoug.com/thoughts/2010/01/31/test-override-useragent/</link>
		<comments>http://somethingdoug.com/thoughts/2010/01/31/test-override-useragent/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 02:15:01 +0000</pubDate>
		<dc:creator>Douglas Wilson</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[cpan]]></category>
		<category><![CDATA[Perl5]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://somethingdoug.com/thoughts/?p=153</guid>
		<description><![CDATA[I have just uploaded a new module to the CPAN: Test::Override::UserAgent. This is geared toward developers that use LWP::UserAgent in their modules and want to easily test their code without having a live Internet connection or starting up a test server to make requests against. Just about every single module I have on the CPAN [...]]]></description>
			<content:encoded><![CDATA[<p>I have just uploaded a new module to the CPAN: <a href="http://search.cpan.org/dist/Test-Override-UserAgent/">Test::Override::UserAgent</a>. This is geared toward developers that use <a href="http://search.cpan.org/perldoc?LWP::UserAgent">LWP::UserAgent</a> in their modules and want to easily test their code without having a live Internet connection or starting up a test server to make requests against. Just about every single module I have on the CPAN uses LWP::UserAgent and makes requests against live servers (usually they are doing web scraping). Before I was using <a href="http://search.cpan.org/perldoc?Test::MockObject">Test::MockObject</a>, but that was tedious at best.</p>
<p>The goal of Test::Override::UserAgent is to be able to write response overrides easily. The module allows for the author to create a class consisting of only definitions for overrides so the override definitions do not have to be repeated in each test file. An example override class would look like:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000066;">package</span> t<span style="color: #339933;">::</span><span style="color: #006600;">CustomUA</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> <span style="color: #cc66cc;">5.008</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Test<span style="color: #339933;">::</span><span style="color: #006600;">Override</span><span style="color: #339933;">::</span><span style="color: #006600;">UserAgent</span> <span style="color: #b1b100;">for</span> <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'configuration'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Disable live requests (the default, anyhow)</span>
allow_live<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
override_request
  host <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'localhost'</span><span style="color: #339933;">,</span>
  path <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'/test'</span><span style="color: #339933;">,</span>
  <span style="color: #000000; font-weight: bold;">sub</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">return</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">200</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #ff0000;">'content-type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'text/plain'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#91;</span><span style="color: #ff0000;">'Test response'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></pre></div></div>

<p>This will cause requests that have a host of <code>localhost</code> and a path of <code>/test</code> to get a response back of <code>text/plain</code> with the <code>Test response</code> body. This configuration can then be used in a test file:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!perl -T</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> <span style="color: #cc66cc;">5.008</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> Test<span style="color: #339933;">::</span><span style="color: #006600;">More</span> tests <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> t<span style="color: #339933;">::</span><span style="color: #006600;">CustomUA</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> My<span style="color: #339933;">::</span><span style="color: #006600;">Module</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Your awesome module to test</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$object</span> <span style="color: #339933;">=</span> new_ok <span style="color: #ff0000;">'My::Module'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Your module has a way to set the user agent it uses</span>
t<span style="color: #339933;">::</span><span style="color: #006600;">CustomUA</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">configuration</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">install_in_user_agent</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$object</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">user_agent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Perhaps your module has no way to set the user agent</span>
<span style="color: #666666; font-style: italic;"># or there is something down stream that uses a user agent.</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$scope</span> <span style="color: #339933;">=</span> t<span style="color: #339933;">::</span><span style="color: #006600;">CustomUA</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">configuration</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">install_in_scope</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Do tests that make requests by LWP::UserAgent</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># End the scope override</span>
<span style="color: #000066;">undef</span> <span style="color: #0000ff;">$scope</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2010/01/31/test-override-useragent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Header in Nagios-Plugin-OverHTTP 0.12</title>
		<link>http://somethingdoug.com/thoughts/2009/10/25/new-header-in-nagios-plugin-overhttp-0-12/</link>
		<comments>http://somethingdoug.com/thoughts/2009/10/25/new-header-in-nagios-plugin-overhttp-0-12/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 00:53:06 +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=137</guid>
		<description><![CDATA[In the newest version of Nagios-Plugin-OverHTTP (0.12) that was just pushed out to the CPAN, support for a new header was introduced, thanks to Alex Wollangk. The header is X-Nagios-Information and is used to contain the message for the plugin check. Why would this be wanted? Well, if added to a page, the page itself [...]]]></description>
			<content:encoded><![CDATA[<p>In the newest version of <a href="http://search.cpan.org/dist/Nagios-Plugin-OverHTTP/">Nagios-Plugin-OverHTTP</a> (0.12) that was just pushed out to the CPAN, support for a new header was introduced, thanks to Alex Wollangk. The header is <code>X-Nagios-Information</code> and is used to contain the message for the plugin check. Why would this be wanted? Well, if added to a page, the page itself can serve a dual purpose: to accessible to a user and be a Nagios check. Also because of this, I have also added the option to customize the HTTP verb to use when making the request (like using the HEAD verb on such a page).</p>
<p>This could be used so that when a HEAD request comes from a specified IP address, the page can do some sort of self-check and output the results in the headers and provide back no body. This would allow for a very wide-range of live checks on a web site, giving up-to-date information regarding areas of the website they you would not notice until a user pointed out to you, allowing it to be fixed before anyone even notices.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2009/10/25/new-header-in-nagios-plugin-overhttp-0-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios::Plugin::OverHTTP 0.11</title>
		<link>http://somethingdoug.com/thoughts/2009/10/05/nagiospluginoverhttp-0-11/</link>
		<comments>http://somethingdoug.com/thoughts/2009/10/05/nagiospluginoverhttp-0-11/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 05:18:37 +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=134</guid>
		<description><![CDATA[A new release of Nagios::Plugin::OverHTTP was just pushed to the CPAN. This release brings no new features, but does change what is installed. The check_over_http script is now no longer automatically installed to the bin. Also when trying to get the plugin to work under ePN in Nagios, I discovered that if some spaces are [...]]]></description>
			<content:encoded><![CDATA[<p>A new release of <a href="http://search.cpan.org/dist/Nagios-Plugin-OverHTTP/">Nagios::Plugin::OverHTTP</a> was just pushed to the CPAN. This release brings no new features, but does change what is installed. The <code>check_over_http</code> script is now no longer automatically installed to the bin. Also when trying to get the plugin to work under <a href="http://nagios.sourceforge.net/docs/3_0/embeddedperl.html">ePN</a> in Nagios, I discovered that if some spaces are at the end of the command line arguments, there is an <code>undef</code> loaded into the <code>@ARGV</code> variable which makes <a href="http://search.cpan.org/perldoc?Getopt::Long">Getopt::Long</a> give a warning, which then causes ePN to abort the plugin. I added some code into the <code>check_over_http</code> plugin distributed with my package that will work around this issue and adds a comment to tell Nagios to load the plugin under ePN. May the new plugin bring you faster service checks!</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2009/10/05/nagiospluginoverhttp-0-11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios::Plugin::OverHTTP 0.10</title>
		<link>http://somethingdoug.com/thoughts/2009/09/10/nagiospluginoverhttp-0-10/</link>
		<comments>http://somethingdoug.com/thoughts/2009/09/10/nagiospluginoverhttp-0-10/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 00:24:01 +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=130</guid>
		<description><![CDATA[Apparently jumped the gun on the release and just added another new feature to Nagios::Plugin::OverHTTP and included it in version 0.10. The new feature is actually complementary to the previous new feature. Now if a response is received from the HTTP server that does not indicate the Nagios service status, then not only will it [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently jumped the gun on the release and just added another new feature to <a href="http://search.cpan.org/dist/Nagios-Plugin-OverHTTP/">Nagios::Plugin::OverHTTP</a> and included it in version 0.10. The new feature is actually complementary to the previous new feature. Now if a response is received from the HTTP server that does not indicate the Nagios service status, then not only will it use the default status (which was the previous feature) but it will attempt to make the first line of the message more useful. This idea occurred to me when a service of mine turned to <code>CRITICAL - &lt;HTML&gt;</code> (which is very unhelpful).</p>
<p>If the response is multiple lines and it looks like HTML (like has a HTML, BODY, or HEAD tag), then the script will attempt to find the TITLE tag and put the contents as the first line of the message. If there is no TITLE tag, then it will try looking for a H1 tag.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2009/09/10/nagiospluginoverhttp-0-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nagios::Plugin::OverHTTP 0.09</title>
		<link>http://somethingdoug.com/thoughts/2009/09/10/nagiospluginoverhttp-0-09/</link>
		<comments>http://somethingdoug.com/thoughts/2009/09/10/nagiospluginoverhttp-0-09/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 22:29:39 +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=127</guid>
		<description><![CDATA[A new version of Nagios::Plugin::OverHTTP was just pushed out to the CPAN that includes an additional option: to set what the status will be reported as if the HTTP response did not include a status. If you want the default status to be critical instead of unknown (the previous and current default), just add --default_status=CRITICAL [...]]]></description>
			<content:encoded><![CDATA[<p>A new version of <a href="http://search.cpan.org/dist/Nagios-Plugin-OverHTTP/">Nagios::Plugin::OverHTTP</a> was just pushed out to the CPAN that includes an additional option: to set what the status will be reported as if the HTTP response did not include a status. If you want the default status to be critical instead of unknown (the previous and current default), just add <code>--default_status=CRITICAL</code> to the command line arguments of the plugin call.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2009/09/10/nagiospluginoverhttp-0-09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Watching Upstream Dependencies</title>
		<link>http://somethingdoug.com/thoughts/2009/08/23/watching-upstream-dependencies/</link>
		<comments>http://somethingdoug.com/thoughts/2009/08/23/watching-upstream-dependencies/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 19:10:10 +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=118</guid>
		<description><![CDATA[I am subscribed to the RSS feed for CPAN uploads and watch for new versions of CPAN distributions my modules depend on and read their change logs. The other day I saw Moose 0.89 come out and saw a new feature added where the trigger of an attribute will now receive the old value if [...]]]></description>
			<content:encoded><![CDATA[<p>I am subscribed to the <a href="http://search.cpan.org/uploads.rdf">RSS feed for CPAN uploads</a> and watch for new versions of CPAN distributions my modules depend on and read their change logs. The other day I saw <a href="http://search.cpan.org/~drolsky/Moose-0.89/">Moose 0.89</a> come out and saw a new feature added where the trigger of an attribute will now receive the old value if there was one.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000066;">package</span> Node<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> Moose <span style="color: #cc66cc;">0.89</span><span style="color: #339933;">;</span>
&nbsp;
has child <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#40;</span>
  is  <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'rw'</span><span style="color: #339933;">,</span>
  isa <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Node'</span><span style="color: #339933;">,</span>
  clearer   <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'clear_child'</span><span style="color: #339933;">,</span>
  predicate <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'has_child'</span><span style="color: #339933;">,</span>
  trigger   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">\&amp;_child_trigger</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
has parent <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#40;</span>
  is  <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'rw'</span><span style="color: #339933;">,</span>
  isa <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'Node'</span><span style="color: #339933;">,</span>
  clearer   <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'clear_parent'</span><span style="color: #339933;">,</span>
  predicate <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'has_parent'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
before clear_child <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: #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: #666666; font-style: italic;"># Trigger dissociate the parent from the child about to be cleared</span>
  <span style="color: #0000ff;">$self</span><span style="color: #339933;">-&gt;</span>_child_trigger<span style="color: #009900;">&#40;</span><span style="color: #000066;">undef</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$self</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">child</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><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> _child_trigger <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: #339933;">,</span> <span style="color: #0000ff;">$child</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$previous_child</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: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">defined</span> <span style="color: #0000ff;">$previous_child</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;"># Remove this node as the parent of the previous child</span>
    <span style="color: #0000ff;">$previous_child</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">clear_parent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">defined</span> <span style="color: #0000ff;">$child</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;"># Set this node as the parent of the new child</span>
    <span style="color: #0000ff;">$child</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">parent</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: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000066;">return</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000066;">no</span> Moose<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></pre></div></div>

<p>I quickly saw the benefit of this new feature for my <a href="http://search.cpan.org/dist/Authen-CAS-External/">Authen::CAS::External</a> distribution and incorporated this into the <code>cas_url</code> and the <code>user_agent</code> attributes. Now the associated LWP::UserAgent always has the proper handlers set up and strange issues where browsing to a CAS page with a user agent object formerly associated with Authen::CAS::External triggering the Authen::CAS::External library will no longer occur.</p>
]]></content:encoded>
			<wfw:commentRss>http://somethingdoug.com/thoughts/2009/08/23/watching-upstream-dependencies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
