[Edinburgh-pm] Code cleanup

Aaron Crane perl at aaroncrane.co.uk
Tue Mar 6 03:51:35 PST 2012

Ian Stuart <Ian.Stuart at ed.ac.uk> wrote:
> On 06/03/12 10:41, Miles Gould wrote:
>> At the risk of marking myself out as a clueless n00b, what's the actual
>> advantage of cpanm over cpan?
> (as another "n00b" on this...)
> From the package web-page:

For me, the performance and memory-use benefits mentioned there are
pleasant, but not really a big deal.  However, the "it just works with
no setup" aspect is lovely, and I think it's therefore a much better
recommendation for the newcomer Miles is trying to help here.  If
someone disagrees, I suggest they install a fresh Perl somewhere, and
run (say) `cpan Moose` in it.  (Real masochists will do this with an
older Perl release; there have certainly been improvements on this
front in recent years.)  Then when CPAN.pm prompts you for answers to
its configuration questions, try hard to read them as if you were a
newcomer not just to Perl, but possibly to programming in general, or
even to the command line.

On the other hand, cpanm is designed to be useful with zero
configuration work.  This is clearly better for beginners, and (I've
found) it's also better for experienced Perl programmers too, because
it takes away unnecessary complexity, letting them focus their
attention on the problems they're actually trying to solve.

Aaron Crane ** http://aaroncrane.co.uk/

More information about the Edinburgh-pm mailing list