App::cpanminus: zero-conf CPAN client December 10, 2010
Posted by claudio in Uncategorized.Tags: cpan, cpanm, Free Software, GNU/Linux, Perl, perlbrew, UNIX
trackback
App::cpanminus (cpanm) is an other great example of programs inscribed in the Modern Perl philosophy. From the CPAN page of the program:
cpanminus is a script to get, unpack, build and install modules from CPAN.
Why? It’s dependency free, requires zero configuration, and stands alone. When running, it requires only 10MB of RAM.
Zero configuration sounds excellent considering the rather steep learning of the (great!) CPAN tools (the cpan command line utility CPAN.pm and CPANPLUS) for new Perl users.
How does it work? Let try a big module with a lot of dependencies and C++ compiling activity. Install the application through cpan if configured (or with one of the standalone installations options):
$ cpan App::cpanminus
[...]
$ cpanm Moose
--> Working on Moose
Fetching http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Moose-1.21.tar.gz ... OK
Configuring Moose-1.21 ... OK
==> Found dependencies: Try::Tiny, Package::DeprecationManager, Test::Requires, Class::MOP, Sub::Exporter, Test::Fatal, Sub::Name, Data::OptList, Params::Util, List::MoreUtils, Task::Weaken
--> Working on Try::Tiny
[...]
Building and testing Moose-1.21 ... OK
Successfully installed Moose-1.21
$ perl -MMoose -e1
No errors. The modules (and their dependencies) installed just fine. Wow.
[...] 1. Install perlbrew and cpanm. You can follow my howtos here: perlbrew, cpanm. [...]
[...] and CEBITT, the 10.000.000th (!!!!!) test report on CPAN thanks to the CPAN Testers, perlbrew, cpanminus, the release of the book Effective Perl Programming (2nd ed.) and Modern [...]