<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Elliot Loves Perl &#187; development</title>
	<atom:link href="http://elliotlovesperl.com/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://elliotlovesperl.com</link>
	<description>A boy and his language</description>
	<lastBuildDate>Wed, 17 Feb 2010 12:43:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='elliotlovesperl.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/7899c71f1e2dd5c5fa1b1ec047ffdf34?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Elliot Loves Perl &#187; development</title>
		<link>http://elliotlovesperl.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://elliotlovesperl.com/osd.xml" title="Elliot Loves Perl" />
	<atom:link rel='hub' href='http://elliotlovesperl.com/?pushpress=hub'/>
		<item>
		<title>Test Moose accessors? Hell, yes.</title>
		<link>http://elliotlovesperl.com/2010/02/16/test-moose-accessors-hell-yes/</link>
		<comments>http://elliotlovesperl.com/2010/02/16/test-moose-accessors-hell-yes/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 02:36:13 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Moose]]></category>
		<category><![CDATA[Test::Moose]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.wordpress.com/?p=158</guid>
		<description><![CDATA[I&#8217;m sorry Dave, but you&#8217;re wrong, wrong, wrong! :] The purpose of testing &#8220;attributes&#8221; is not to test that Moose did its thing. The purpose of testing attributes&#8217; accessors is that they are part of your class&#8217; interface. That an accessor is backed by a Moose attribute is an implementation detail. Just because get_foo() is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=158&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sorry Dave, but <a href="http://blog.urth.org/2010/02/the-purpose-of-automated-tests.html">you&#8217;re wrong, wrong, wrong</a>! :]</p>
<p>
The purpose of testing &#8220;attributes&#8221; is not to test that Moose did its thing.  The purpose of testing attributes&#8217; accessors is that they are part of your class&#8217; interface.  That an accessor is backed by a Moose attribute is an implementation detail.  Just because <code>get_foo()</code> is an attribute accessor today doesn&#8217;t mean that the data won&#8217;t be stored elsewhere in the future or even be derived from something else.</p>
<p>
What you shouldn&#8217;t be doing is using <code>has_attribute_ok()</code> from Test::Moose, again because where the data returned by the accessor is coming from shouldn&#8217;t matter to users of your class.</p>
<br /> Tagged: <a href='http://elliotlovesperl.com/tag/development/'>development</a>, <a href='http://elliotlovesperl.com/tag/moose/'>Moose</a>, <a href='http://elliotlovesperl.com/tag/testmoose/'>Test::Moose</a>, <a href='http://elliotlovesperl.com/tag/testing/'>testing</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=158&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2010/02/16/test-moose-accessors-hell-yes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
		<item>
		<title>Don&#8217;t put Perl::Critic into source control pre-commit hooks.</title>
		<link>http://elliotlovesperl.com/2009/12/27/dont-put-perlcritic-into-source-control-pre-commit-hooks/</link>
		<comments>http://elliotlovesperl.com/2009/12/27/dont-put-perlcritic-into-source-control-pre-commit-hooks/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 16:30:00 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Perl::Critic]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.wordpress.com/?p=156</guid>
		<description><![CDATA[Some people seem to like to put Perl::Critic tests into their VCS pre-commit hooks in order to prevent code with violations being checked in. I consider this to be a really bad idea. You should always be able to check your code in, if only for backup purposes. It&#8217;s a matter of preserving your code, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=156&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some people seem to like to put <a href="http://alexander-simakov.blogspot.com/2009/12/using-perlcritic-in-subversion-hook.html">Perl::Critic tests into their VCS pre-commit hooks</a> in order to prevent code with violations being checked in.  I consider this to be a really bad idea.  You should always be able to check your code in, if only for backup purposes.  It&#8217;s a matter of preserving your code, even if it&#8217;s got some stupid <a href="http://search.cpan.org/perldoc?Perl::Critic::Policy::Documentation::PodSpelling">PodSpelling</a> violation.  You&#8217;ve got a production emergency bug fix and you can&#8217;t check in because you&#8217;ve got a <a href="http://search.cpan.org/perldoc?Perl::Critic::Policy::RegularExpressions::ProhibitEscapedMetacharacters">ProhibitEscapedMetacharacters</a> problem?  I certainly wouldn&#8217;t want that.</p>
<br /> Tagged: development, Perl::Critic <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=156&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2009/12/27/dont-put-perlcritic-into-source-control-pre-commit-hooks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
		<item>
		<title>If it&#8217;s broken, fix it — dammit.</title>
		<link>http://elliotlovesperl.com/2009/11/28/if-its-broken-fix-it-%e2%80%94-dammit/</link>
		<comments>http://elliotlovesperl.com/2009/11/28/if-its-broken-fix-it-%e2%80%94-dammit/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 18:56:33 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[maintenance]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.wordpress.com/?p=152</guid>
		<description><![CDATA[I was reminded of the epigram &#8220;If it&#8217;s broken, don&#8217;t fix it.&#8221;. My problem with this is that people don&#8217;t apply the contrapositive. So many just leave things that don&#8217;t work around, and that plain sucks. Don&#8217;t suffer brokenness. Fix it. Tagged: development, maintenance<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=152&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was <a href="http://szabgab.com/blog/2009/11/1259431123.html">reminded</a> of the epigram &#8220;If it&#8217;s broken, don&#8217;t fix it.&#8221;. My problem with this is that people don&#8217;t apply the contrapositive. So many just leave things that don&#8217;t work around, and that plain sucks.</p>
<p>Don&#8217;t suffer brokenness. Fix it.</p>
<br /> Tagged: development, maintenance <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=152&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2009/11/28/if-its-broken-fix-it-%e2%80%94-dammit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
		<item>
		<title>How to structure Perl programs.</title>
		<link>http://elliotlovesperl.com/2009/11/23/how-to-structure-perl-programs/</link>
		<comments>http://elliotlovesperl.com/2009/11/23/how-to-structure-perl-programs/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 20:15:51 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[coding style]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[programs]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.wordpress.com/?p=148</guid>
		<description><![CDATA[Don&#8217;t put the implementation of your program in your program; put it in a module instead. There are at least three reasons for doing things this way: Your code is more testable. You can feed in arbitrary command lines and check the exit code. Your code is reusable. If you need to use your program [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=148&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Don&#8217;t put the implementation of your program in your program; put it in a module instead.  There are at least three reasons for doing things this way:</p>
<ul>
<li>Your code is more testable.  You can feed in arbitrary command lines and check the exit code.</li>
<li>Your code is reusable.  If you need to use your program from another Perl program, there&#8217;s no need to use <code>system</code>, backticks, or <a href="http://search.cpan.org/perldoc/IPC::System::Simple">IPC::System::Simple</a>, just <code>use</code> your module and call the implementing subroutine.</li>
<li>Your programs can be better managed by the standard Perl toolchain.  Program versions are not checked by CPAN, et. al. so if you create a new version of an existing program, it won&#8217;t be upgraded.  If all of your code is in a module, then version changes will cause updates to be installed.</li>
</ul>
<p>A simple way of doing this would be to have a module that looks like</p>
<div style="background-color:#333;margin:1em 2em;">
<font face="monospace"><br />
<font color="#ff0">&nbsp;1 </font><font color="#f0e68c"><b>package</b></font><font color="#bdb76b"><b>&nbsp;ProgramImplementation;</b></font><br />
<font color="#ff0">&nbsp;2 </font><br />
<font color="#ff0">&nbsp;3 </font><font color="#f0e68c"><b>use utf8</b></font>;<br />
<font color="#ff0">&nbsp;4 </font><font color="#f0e68c"><b>use </b></font><font color="#ffa0a0">5.010</font>;<br />
<font color="#ff0">&nbsp;5 </font><br />
<font color="#ff0">&nbsp;6 </font><font color="#f0e68c"><b>use strict</b></font>;<br />
<font color="#ff0">&nbsp;7 </font><font color="#f0e68c"><b>use warnings</b></font>;<br />
<font color="#ff0">&nbsp;8 </font><br />
<font color="#ff0">&nbsp;9 </font><font color="#f0e68c"><b>use </b></font>Exporter <font color="#ffa0a0">qw&lt;</font><font color="#ffa0a0">&nbsp;import </font><font color="#ffa0a0">&gt;</font>;<br />
<font color="#ff0">10 </font><br />
<font color="#ff0">11 </font><font color="#f0e68c"><b>our</b></font>&nbsp;<font color="#98fb98">@EXPORT_OK</font>&nbsp;= <font color="#ffa0a0">qw&lt;</font><font color="#ffa0a0">&nbsp;run </font><font color="#ffa0a0">&gt;</font>;<br />
<font color="#ff0">12 </font><br />
<font color="#ff0">13 </font><br />
<font color="#ff0">14 </font><font color="#f0e68c"><b>sub</b></font><font color="#98fb98">&nbsp;</font><font color="#98fb98">run </font>{<br />
<font color="#ff0">15 </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#f0e68c"><b>my</b></font>&nbsp;(<font color="#98fb98">@argv</font>) = <font color="#98fb98">@_</font>;<br />
<font color="#ff0">16 </font><br />
<font color="#ff0">17 </font>&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<br />
<font color="#ff0">18 </font><br />
<font color="#ff0">19 </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#f0e68c"><b>return</b></font>&nbsp;<font color="#ffa0a0">0</font>;<br />
<font color="#ff0">20 </font>}<br />
<font color="#ff0">21 </font><br />
<font color="#ff0">22 </font><font color="#ffa0a0">1</font>;<br />
</font>
</div>
<p>and then use that like this:</p>
<div style="background-color:#333;margin:1em 2em;">
<font face="monospace"><br />
<font color="#ff0">&nbsp;1 </font><font color="#f0e68c"><b>use utf8</b></font>;<br />
<font color="#ff0">&nbsp;2 </font><font color="#f0e68c"><b>use </b></font><font color="#ffa0a0">5.010</font>;<br />
<font color="#ff0">&nbsp;3 </font><br />
<font color="#ff0">&nbsp;4 </font><font color="#f0e68c"><b>use strict</b></font>;<br />
<font color="#ff0">&nbsp;5 </font><font color="#f0e68c"><b>use warnings</b></font>;<br />
<font color="#ff0">&nbsp;6 </font><br />
<font color="#ff0">&nbsp;7 </font><font color="#f0e68c"><b>use </b></font>ProgramImplementation <font color="#ffa0a0">qw&lt;</font><font color="#ffa0a0">&nbsp;run </font><font color="#ffa0a0">&gt;</font>;<br />
<font color="#ff0">&nbsp;8 </font><br />
<font color="#ff0">&nbsp;9 </font><font color="#f0e68c"><b>return</b></font>&nbsp;<font color="#ffa0a0">1</font>&nbsp;<font color="#f0e68c"><b>if</b></font>&nbsp;<font color="#f0e68c"><b>caller</b></font>;<br />
<font color="#ff0">10 </font><font color="#f0e68c"><b>exit</b></font>&nbsp;run(<font color="#98fb98">@ARGV</font>);<br />
</font>
</div>
<p>Having the &#8220;<code>return 1 if caller</code>&#8221; in there means that the program can be <code>require</code>d without causing the requiring program to exit.  (Whether you ought to actually do that is another matter.)</p>
<p>If you want things to be even more reusable, make your program implementation an object with attributes for the standard file handles:</p>
<div style="background-color:#333;margin:1em 2em;">
<font face="monospace"><br />
<font color="#ff0">&nbsp;1 </font><font color="#f0e68c"><b>package</b></font><font color="#bdb76b"><b>&nbsp;ObjectProgramImplementation;</b></font><br />
<font color="#ff0">&nbsp;2 </font><br />
<font color="#ff0">&nbsp;3 </font><font color="#f0e68c"><b>use utf8</b></font>;<br />
<font color="#ff0">&nbsp;4 </font><font color="#f0e68c"><b>use </b></font><font color="#ffa0a0">5.010</font>;<br />
<font color="#ff0">&nbsp;5 </font><br />
<font color="#ff0">&nbsp;6 </font><font color="#f0e68c"><b>use </b></font>Moose;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#87ceeb"># Or your favorite object module.</font><br />
<font color="#ff0">&nbsp;7 </font><br />
<font color="#ff0">&nbsp;8 </font>has <font color="#ffa0a0">stdout </font>=&gt; (<br />
<font color="#ff0">&nbsp;9 </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ffa0a0">isa </font>=&gt; <font color="#ffa0a0">&#8216;</font><font color="#ffa0a0">FileHandle</font><font color="#ffa0a0">&#8216;</font>,<br />
<font color="#ff0">10 </font>&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<br />
<font color="#ff0">11 </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ffa0a0">default </font>=&gt;<font color="#98fb98">&nbsp;</font><font color="#f0e68c"><b>sub</b></font><font color="#98fb98">&nbsp;</font>{ \*STDOUT },<br />
<font color="#ff0">12 </font>);<br />
<font color="#ff0">13 </font><br />
<font color="#ff0">14 </font>has <font color="#ffa0a0">stderr </font>=&gt; (<br />
<font color="#ff0">15 </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ffa0a0">isa </font>=&gt; <font color="#ffa0a0">&#8216;</font><font color="#ffa0a0">FileHandle</font><font color="#ffa0a0">&#8216;</font>,<br />
<font color="#ff0">16 </font>&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<br />
<font color="#ff0">17 </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ffa0a0">default </font>=&gt;<font color="#98fb98">&nbsp;</font><font color="#f0e68c"><b>sub</b></font><font color="#98fb98">&nbsp;</font>{ \*STDERR },<br />
<font color="#ff0">18 </font>);<br />
<font color="#ff0">19 </font><br />
<font color="#ff0">20 </font><br />
<font color="#ff0">21 </font><font color="#f0e68c"><b>sub</b></font><font color="#98fb98">&nbsp;</font><font color="#98fb98">run </font>{<br />
<font color="#ff0">22 </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#f0e68c"><b>my</b></font>&nbsp;(<font color="#98fb98">$self</font>, <font color="#98fb98">@argv</font>) = <font color="#98fb98">@_</font>;<br />
<font color="#ff0">23 </font><br />
<font color="#ff0">24 </font>&nbsp;&nbsp;&nbsp;&nbsp;say { <font color="#98fb98">$self</font>-&gt;stdout() } <font color="#ffa0a0">&#8216;</font><font color="#ffa0a0">Hello there!</font><font color="#ffa0a0">&#8216;</font>;<br />
<font color="#ff0">25 </font>&nbsp;&nbsp;&nbsp;&nbsp;&#8230;<br />
<font color="#ff0">26 </font><br />
<font color="#ff0">27 </font>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#f0e68c"><b>return</b></font>&nbsp;<font color="#ffa0a0">0</font>;<br />
<font color="#ff0">28 </font>}<br />
<font color="#ff0">29 </font><br />
<font color="#ff0">30 </font><font color="#ffa0a0">1</font>;<br />
</font>
</div>
<p>Your regular program would then look like this:</p>
<div style="background-color:#333;margin:1em 2em;">
<font face="monospace"><br />
<font color="#ff0">&nbsp;1 </font><font color="#f0e68c"><b>use utf8</b></font>;<br />
<font color="#ff0">&nbsp;2 </font><font color="#f0e68c"><b>use </b></font><font color="#ffa0a0">5.010</font>;<br />
<font color="#ff0">&nbsp;3 </font><br />
<font color="#ff0">&nbsp;4 </font><font color="#f0e68c"><b>use strict</b></font>;<br />
<font color="#ff0">&nbsp;5 </font><font color="#f0e68c"><b>use warnings</b></font>;<br />
<font color="#ff0">&nbsp;6 </font><br />
<font color="#ff0">&nbsp;7 </font><font color="#f0e68c"><b>use </b></font>ObjectProgramImplementation <font color="#ffa0a0">qw&lt;</font><font color="#ffa0a0">&nbsp;</font><font color="#ffa0a0">&gt;</font>;<br />
<font color="#ff0">&nbsp;8 </font><br />
<font color="#ff0">&nbsp;9 </font><font color="#f0e68c"><b>return</b></font>&nbsp;<font color="#ffa0a0">1</font>&nbsp;<font color="#f0e68c"><b>if</b></font>&nbsp;<font color="#f0e68c"><b>caller</b></font>;<br />
<font color="#ff0">10 </font><font color="#f0e68c"><b>exit</b></font>&nbsp;ObjectProgramImplementation-&gt;<font color="#f0e68c"><b>new</b></font>()-&gt;run(<font color="#98fb98">@ARGV</font>);<br />
</font>
</div>
<p>But you can have other uses like</p>
<div style="background-color:#333;margin:1em 2em;">
<font face="monospace"><br />
<font color="#ffff00">&nbsp;1 </font><font color="#f0e68c"><b>my</b></font>&nbsp;<font color="#98fb98">$stdout</font>;<br />
<font color="#ffff00">&nbsp;2 </font><font color="#f0e68c"><b>my</b></font>&nbsp;<font color="#98fb98">$stderr</font>;<br />
<font color="#ffff00">&nbsp;3 </font><font color="#f0e68c"><b>open</b></font>&nbsp;<font color="#f0e68c"><b>my</b></font>&nbsp;<font color="#98fb98">$stdout_handle</font>, <font color="#ffa0a0">&#8216;</font><font color="#ffa0a0">&gt;</font><font color="#ffa0a0">&#8216;</font>, <font color="#98fb98">\$stdout</font>;<br />
<font color="#ffff00">&nbsp;4 </font><font color="#f0e68c"><b>open</b></font>&nbsp;<font color="#f0e68c"><b>my</b></font>&nbsp;<font color="#98fb98">$stderr_handle</font>, <font color="#ffa0a0">&#8216;</font><font color="#ffa0a0">&gt;</font><font color="#ffa0a0">&#8216;</font>, <font color="#98fb98">\$stderr</font>;<br />
<font color="#ffff00">&nbsp;5 </font><br />
<font color="#ffff00">&nbsp;6 </font><font color="#f0e68c"><b>my</b></font>&nbsp;<font color="#98fb98">$program</font>&nbsp;=<br />
<font color="#ffff00">&nbsp;7 </font>&nbsp;&nbsp;&nbsp;&nbsp;ObjectProgramImplementation-&gt;<font color="#f0e68c"><b>new</b></font>(<font color="#ffa0a0">stdout </font>=&gt; <font color="#98fb98">$stdout</font>, <font color="#ffa0a0">stderr </font>=&gt; <font color="#98fb98">$stderr</font>);<br />
<font color="#ffff00">&nbsp;8 </font><font color="#f0e68c"><b>my</b></font>&nbsp;<font color="#98fb98">$exit_code</font>&nbsp;= <font color="#98fb98">$program</font>-&gt;run(<font color="#98fb98">@ARGV</font>);<br />
<font color="#ffff00">&nbsp;9 </font><br />
<font color="#ffff00">10 </font><font color="#87ceeb"># Do something with $stdout/$stderr</font><br />
</font>
</div>
<br /> Tagged: coding style, development, programs <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=148&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2009/11/23/how-to-structure-perl-programs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
		<item>
		<title>Deprecation.</title>
		<link>http://elliotlovesperl.com/2009/07/26/deprecation/</link>
		<comments>http://elliotlovesperl.com/2009/07/26/deprecation/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 03:36:50 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[perl 5]]></category>
		<category><![CDATA[Perl::Critic]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.wordpress.com/?p=144</guid>
		<description><![CDATA[In the source repository, there are a number of changes to Perl::Critic that include deprecation of existing functions/methods. One Policy author has asked us to not do the deprecation because it will result in warnings being emitted whenever his Policy is being used. There have been a lot of discussion recently in the Perl community [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=144&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the source repository, there are a number of changes to Perl::Critic that include deprecation of existing functions/methods.  One Policy author has asked us to not do the deprecation because it will result in warnings being emitted whenever his Policy is being used.</p>
<p>There have been a <a href="http://perl.markmail.org/search/?q=subject%3Adeprecation+date%3A20090501-20090731">lot</a> of <a href="http://www.modernperlbooks.com/mt/2009/07/the-what-does-deprecation-actually-mean-meta-argument.html">discussion</a> recently in the Perl community about what deprecation means.  For me, deprecation means that the interface or functionality will be removed and not sit around in a limbo state for years.</p>
<p>So how do I decide whether to deprecate something?  If something is merely suboptimal, I&#8217;m not going to deprecate it; I&#8217;ll merely change the documentation to discourage its use.  In Perl::Critic, there was the issue of Policy constructors.  For a long time, there was no requirements for the <code>new()</code> method for a given Policy other than it returning a blessed hash.  There are some Policys [sic] outside of the core distribution with <code>new()</code> methods that don&#8217;t call up to the <code>new()</code> method in <code>Perl::Critic::Policy</code>.  There was a point when we really wanted to add a lot of functionality to the constructor, but we couldn&#8217;t because there were Policys that didn&#8217;t call it.  We worked around this by doing what we wanted after the Policy object was constructed.  If you look at the <a href="http://search.cpan.org/perldoc/Perl::Critic::DEVELOPER">developer documentation</a> for Perl::Critic, you&#8217;ll note that it discourages creation of a <code>new()</code> method.</p>
<p>On the other hand, if something is incorrectly designed or is holding up future changes, I&#8217;m going to change it or remove it.  I&#8217;m not going to just work around the issue forever.  I won&#8217;t change it without notifying anyone, however.</p>
<p>I made a mistake with the design of <code>Perl::Critic::Utils::PPI::get_constant_name_element_from_declaring_statement()</code>.  I didn&#8217;t realize that you can actually create multiple values using the <code>constant</code> pragma; Tom Wyant corrected my misconception.  The function returns a single value, so it can&#8217;t correctly handle single statements that declare multiple constants.  Its interface is wrong.  It will be removed in the future.  A suggestion was made to immediately remove it, but we&#8217;ll go through a deprecation cycle first.  We won&#8217;t change things without giving notice.</p>
<p>I think the Policy author&#8217;s question about the warnings comes from the practice of a number of projects of &#8220;deprecating&#8221; something, but never actually removing it.  Sun is a particularly egregious example of this with Java functionality that has been deprecated for more than a decade but still hangs around, allowing people to write new code against an interface that is broken.  If I deprecate something, it will be removed.  The warnings that are emitted allow others to deal with the change before it happens.  If, in the interim, this annoys some users, too bad.  It would be worse if the code just stopped working.</p>
<p>If you have a look at <a href="http://galumph.com/code/">my code page</a>, among the epigrams that you find there is &#8220;If it&#8217;s broken, fix it.&#8221;.  While there has long been the saying of not fixing something that isn&#8217;t broken, I think people don&#8217;t do the opposite enough.  Don&#8217;t suffer breakage.  Don&#8217;t put up with things that are wrong.  Change things that need changing, even if it causes some short-term pain.</p>
<br /> Tagged: development, perl 5, Perl::Critic <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=144&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2009/07/26/deprecation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
		<item>
		<title>How I use Perl::Critic.</title>
		<link>http://elliotlovesperl.com/2009/07/20/how-i-use-perlcritic/</link>
		<comments>http://elliotlovesperl.com/2009/07/20/how-i-use-perlcritic/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 05:05:46 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Perl::Critic]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.wordpress.com/?p=138</guid>
		<description><![CDATA[Under regular development conditions, I rarely use perlcritic. Most of my Perl::Critic usage is via Test::Perl::Critic for new code and Test::Perl::Critic::Progressive for existing code. For code that I release to the CPAN, the Perl::Critic tests are in xt/author so that they don&#8217;t get run as part of normal tests that someone installing the modules runs. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=138&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
Under regular development conditions, I rarely use <code><a href="http://search.cpan.org/perldoc/perlcritic">perlcritic</a></code>.  Most of my Perl::Critic usage is via <a href="http://search.cpan.org/perldoc/Test::Perl::Critic">Test::Perl::Critic</a> for new code and <a href="http://search.cpan.org/perldoc/Test::Perl::Critic::Progressive">Test::Perl::Critic::Progressive</a> for existing code.
</p>
<p>
For code that I release to the CPAN, the Perl::Critic tests are in <code>xt/author</code> so that they don&#8217;t get run as part of normal tests that someone installing the modules runs.  On someone else&#8217;s system, I don&#8217;t know what Perl::Critic version or add-on sets of policies they have, so those tests may fail there through no fault of my own.
</p>
<p>
For non-public code, the Perl::Critic tests are regular tests that get run with all the rest of the tests.  I can do this because I control the specific version of Perl::Critic that I&#8217;m running and which add-on policies that I&#8217;ve got around.
</p>
<p>
Perl::Critic supports the concept of severity levels for policies and, by default, only applies the most severe ones (severity 5).  I effectively ignore the severities by turning Perl::Critic&#8217;s strictness all the way to 1.  Of course, there are policies that I don&#8217;t agree with or cannot use for practical reasons, so I disable those explicitly.
</p>
<p>
You may have noticed that above I used the word &#8220;tests&#8221; and not &#8220;test&#8221;.  This is because I run Perl::Critic on my tests as well as my &#8220;real&#8221; code.  The set of policies that I use on tests is different than I use on the rest of my code.  Tests have fewer restrictions on them compared to regular code.  So I have a test that applies to the contents of <code>lib</code> and <code>bin</code> using one <code>perlcriticrc</code> file and a seperate test that runs on the content of the <code>t</code> and <code>xt</code> directories with a different <code>perlcriticrc</code>.  For tests, I disable the POD policies and <a href="http://search.cpan.org/perldoc/Perl::Critic::Policy::Subroutines::ProtectPrivateSubs">Subroutines::ProtectPrivateSubs</a> (tests are allowed to peek).  Sometimes I also disable <a href="http://search.cpan.org/perldoc/Perl::Critic::Policy::ValuesAndExpressions::ProhibitMagicNumbers">ValuesAndExpressions::ProhibitMagicNumbers</a>, though I prefer not to.
</p>
<p>
(Perl::Critic actually uses three self-compliance tests: one for the regular code, one for the tests, and one that makes an additional pass over the Perl::Critic::Policy subclasses that places some additional requirements on them.)
</p>
<p>
The sets of add-on policies that I generally use are <a href="http://search.cpan.org/perldoc/Perl::Critic::More">Perl::Critic::More</a>, <a href="http://search.cpan.org/perldoc/Perl::Critic::Bangs">Perl::Critic::Bangs</a>, <a href="http://search.cpan.org/perldoc/Perl::Critic::Swift">Perl::Critic::Swift</a>, and <a href="http://search.cpan.org/perldoc/Perl::Critic::Moose">Perl::Critic::Moose</a>.  I&#8217;m thinking about starting to use <a href="http://search.cpan.org/perldoc/Perl::Critic::Pulp">Perl::Critic::Pulp</a>, but I&#8217;d have to disable about half the policies in there.
</p>
<p>
There are a couple of cases in which I do use <code>perlcritic</code>.
</p>
<p>
First, if I&#8217;m surveying a codebase that is new to me, I will run <code>perlcritic --statistics-only</code> over it in order to get an idea of the state of affairs.
</p>
<p>
Second, presented with a set of code that has a large number of problems that need fixing, after running <code>perlcritic --statistics-only</code> on it, I&#8217;ll pick an individual policy that I want to fix violations of and run <code>perlcritic -s <em>policy name</em></code> on the code.  (The long form of <code>-s</code> is <code>--single-policy</code>.)  I find it easier to fix one kind of problem across all of the files before moving on to another kind of problem than to fix all the problems in one file before moving on to another file.</p>
<br /> Tagged: development, Perl::Critic <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/138/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=138&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2009/07/20/how-i-use-perlcritic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
		<item>
		<title>Eliminating all inheritance from my code.</title>
		<link>http://elliotlovesperl.com/2009/04/24/eliminating-all-inheritance-from-my-code/</link>
		<comments>http://elliotlovesperl.com/2009/04/24/eliminating-all-inheritance-from-my-code/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 18:22:29 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Moose]]></category>
		<category><![CDATA[roles]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.com/?p=95</guid>
		<description><![CDATA[Moose Roles rock! I&#8217;m following Ovid&#8216;s example and getting rid of inheritance in my code: nothing will inherit from anything. You&#8217;ll be able to tell what the code does without searching for a superclass&#8217; superclass&#8217; superclass. Tagged: development, Moose, roles<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=95&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.iinteractive.com/moose/">Moose</a> <a href="http://search.cpan.org/dist/Moose/lib/Moose/Manual/Roles.pod">Roles</a> rock! I&#8217;m following <a href="http://use.perl.org/~Ovid/journal/">Ovid</a>&#8216;s example and getting rid of inheritance in my code: nothing will inherit from anything. You&#8217;ll be able to tell what the code does without searching for a superclass&#8217; superclass&#8217; superclass.</p>
<br /> Tagged: development, Moose, roles <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=95&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2009/04/24/eliminating-all-inheritance-from-my-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
		<item>
		<title>Communicating opinions via method implementation choices in class hierarchies.</title>
		<link>http://elliotlovesperl.com/2009/02/11/communicating-opinions-via-method-implementation-choices-in-class-hierarchies/</link>
		<comments>http://elliotlovesperl.com/2009/02/11/communicating-opinions-via-method-implementation-choices-in-class-hierarchies/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 17:59:18 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.com/?p=79</guid>
		<description><![CDATA[Dealing with the differences in the ways that the CME and the ICE use FIX has been interesting. Some of the differences are simply, oh, this one does things this way and this other one does things another. And some of them are, this is what I expect should be normal and why the hell [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=79&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Dealing with the differences in the ways that the <a href="http://www.cmegroup.com/">CME</a> and the <a href="https://www.theice.com/">ICE</a> use <a href="http://www.fixprotocol.org/">FIX</a> has been interesting. Some of the differences are simply, oh, this one does things this way and this other one does things another. And some of them are, this is what I expect should be normal and why the hell is this exchange doing things like this? This ends up being reflected in the code.</p>
<p>I&#8217;ve got a base message class with a subclass for each exchange. For the former kind of differences, I&#8217;ve got an abstract method on the base class with the appropriate implementations on the subclasses. For the &#8220;WTF?&#8221; things, I&#8217;ve got a default implementation on the base class, and override that on the specific subclass.</p>
<br /> Tagged: development <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=79&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2009/02/11/communicating-opinions-via-method-implementation-choices-in-class-hierarchies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
		<item>
		<title>Improbable vs Statistically Impossible</title>
		<link>http://elliotlovesperl.com/2008/10/10/improbable-vs-statistically-impossible/</link>
		<comments>http://elliotlovesperl.com/2008/10/10/improbable-vs-statistically-impossible/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 17:44:32 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.com/?p=69</guid>
		<description><![CDATA[Schwern on git hashes. Every time this comes up someone says &#8220;but what if they collide?! Hashes sometimes collide!&#8221; I confess to being one of those who want things to be really impossible, not merely &#8220;statistically impossible&#8221;. Tagged: development<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=69&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://use.perl.org/~schwern/journal/37600">Schwern on git hashes.</a></p>
<blockquote><p>Every time this comes up someone says &#8220;but what if they collide?! Hashes sometimes collide!&#8221;</p></blockquote>
<p>I confess to being one of those who want things to be really impossible, not merely &#8220;statistically impossible&#8221;.</p>
<br /> Tagged: development <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=69&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2008/10/10/improbable-vs-statistically-impossible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
		<item>
		<title>Optimizing for the developer, not the user.</title>
		<link>http://elliotlovesperl.com/2008/10/02/optimizing-for-the-developer-not-the-user/</link>
		<comments>http://elliotlovesperl.com/2008/10/02/optimizing-for-the-developer-not-the-user/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 17:39:22 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bug reporting]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.com/?p=66</guid>
		<description><![CDATA[Mr. Lester, as usual, with the good stuff. While the example he&#8217;s using is PHP, it seems people didn&#8217;t understand that the point was in general, so there&#8217;s a follow up. Tagged: bug reporting, development<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=66&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Mr. Lester, as usual, with <a href="http://perlbuzz.com/2008/09/optimizing-for-the-developer-not-the-user-php-misses-again.html">the good stuff</a>. While the example he&#8217;s using is PHP, it seems people didn&#8217;t understand that the point was in general, so there&#8217;s <a href="http://perlbuzz.com/2008/10/developer-optimization-redux.html">a follow up</a>.</p>
<br /> Tagged: bug reporting, development <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=66&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2008/10/02/optimizing-for-the-developer-not-the-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
		<item>
		<title>Names</title>
		<link>http://elliotlovesperl.com/2008/09/10/names/</link>
		<comments>http://elliotlovesperl.com/2008/09/10/names/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 17:15:49 +0000</pubDate>
		<dc:creator>elliotlovesperl</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://elliotlovesperl.com/?p=56</guid>
		<description><![CDATA[A topic anyone who&#8217;s known my programming style for a while knows that this is one of my pet peeves. Why can&#8217;t people use understandable variable names? I just got though producing a set of constants for FIX message types and fields. I hate abbreviations that come from outside the problem domain, i.e. that an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=56&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A topic anyone who&#8217;s known my programming style for a while knows that this is one of my pet peeves. Why can&#8217;t people use understandable variable names?</p>
<p>I just got though producing a set of constants for <a href="http://www.fixprotocol.org/">FIX</a> message types and fields. I hate abbreviations that come from outside the problem domain, i.e. that an end user wouldn&#8217;t understand. I hate abbreviations in general, but specifically for &#8220;number&#8221; because there&#8217;s three different common ones in use. FIX uses two of them, with no clear reason for the difference.</p>
<p>In the world of finance, &#8220;FX&#8221; is a reasonable abbreviation to use in names, because the end users understand what it means. In FIX, there&#8217;s a field called &#8220;DKReason&#8221;; care to guess what &#8220;DK&#8221; stands for? If you said you &#8220;don&#8217;t know&#8221;, you&#8217;re correct. Yes, it literally stands for &#8220;don&#8217;t know&#8221;. The description for the field is &#8220;Reason for execution rejection.&#8221;, but if you&#8217;re reading through unfamiliar code and see &#8220;DKReason&#8221;, how the hell are you expected to understand the significance without hours of digging?</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/elliotlovesperl.wordpress.com/56/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/elliotlovesperl.wordpress.com/56/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/elliotlovesperl.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/elliotlovesperl.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/elliotlovesperl.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/elliotlovesperl.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/elliotlovesperl.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/elliotlovesperl.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/elliotlovesperl.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/elliotlovesperl.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/elliotlovesperl.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/elliotlovesperl.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/elliotlovesperl.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/elliotlovesperl.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/elliotlovesperl.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/elliotlovesperl.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=elliotlovesperl.com&amp;blog=7775865&amp;post=56&amp;subd=elliotlovesperl&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://elliotlovesperl.com/2008/09/10/names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e2e2e6430cc24b91f3c25f25fba6d9e6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">elliotlovesperl</media:title>
		</media:content>
	</item>
	</channel>
</rss>