Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>My favourite pieces of elegant Perl code aren't necessarily elegant at all. They're <em>meta-elegant</em>, and allow you to get rid of all those bad habits that many Perl developers have slipped into. It would take me hours or days to show them all in the detail they deserve, but as a short list they include:</p> <ul> <li><a href="http://search.cpan.org/perldoc?autobox" rel="noreferrer">autobox</a>, which turns Perl's primitives into first-class objects.</li> <li><a href="http://search.cpan.org/perldoc?autodie" rel="noreferrer">autodie</a>, which causes built-ins to throw exceptions on failure (removing most needs for the <code>or die...</code> construct). See also my <a href="http://pjf.id.au/blog/index.rss?tag=autodie" rel="noreferrer">autodie blog</a> and <a href="http://pjf.id.au/blog/?position=540" rel="noreferrer">video</a>).</li> <li><a href="http://moose.perl.org/" rel="noreferrer">Moose</a>, which provide an elegant, extensible, and <em>correct</em> way of writing classes in Perl.</li> <li><a href="http://search.cpan.org/perldoc?MooseX::Declare" rel="noreferrer">MooseX::Declare</a>, which provides syntaxic aweseomeness when using Moose.</li> <li><a href="http://perlcritic.com/" rel="noreferrer">Perl::Critic</a>, your personal, automatic, extensible and knowledgeable code reviewer. See also <a href="http://perltraining.com.au/tips/2009-02-05.html" rel="noreferrer">this Perl-tip</a>.</li> <li><a href="http://search.cpan.org/perldoc?Devel::NYTProf" rel="noreferrer">Devel::NYTProf</a>, which provides me the most detailed and usable profiling information I've seen in <em>any</em> programming language. See also <a href="http://blog.timbunce.org/2008/07/15/nytprof-v2-a-major-advance-in-perl-profilers/" rel="noreferrer">Tim Bunce's Blog</a>.</li> <li><a href="http://search.cpan.org/perldoc?PAR" rel="noreferrer">PAR</a>, the Perl Archiver, for bundling distributions and even turning whole programs into stand-alone executable files. See also this <a href="http://perltraining.com.au/tips/2008-05-23.html" rel="noreferrer">Perl-tip</a>.</li> <li>Perl 5.10, which provides some stunning <a href="http://perltraining.com.au/tips/2008-02-08.html" rel="noreferrer">regexp improvements</a>, <a href="http://perltraining.com.au/tips/2008-04-18.html" rel="noreferrer">smart-match</a>, the <a href="http://perltraining.com.au/tips/2008-03-12.html" rel="noreferrer">switch statement</a>, <a href="http://perltraining.com.au/tips/2008-03-03.html" rel="noreferrer">defined-or, and state variables</a>.</li> <li><a href="http://padre.perlide.org/" rel="noreferrer">Padre</a>, the only Perl editor that integrates the best bits of the above, is cross-platform, and is completely free and open source.</li> </ul> <p>If you're too lazy to follow links, I recently did a <a href="http://linux.conf.au/programme/schedule/view_talk/175" rel="noreferrer">talk at Linux.conf.au</a> about most of the above. If you missed it, there's a <a href="http://mirror.linux.org.au/pub/linux.conf.au/2009/Friday/175.ogg" rel="noreferrer">video of it on-line</a> (ogg theora). If you're too lazy to watch videos, I'm doing a greatly expanded version of the talk as a tutorial at OSCON this year (entitled <em>doing Perl right</em>).</p> <p>All the best,</p> <p><em>Paul</em></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload