Mai 2013

So Mo Di Mi Do Fr Sa
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Tags


Mit “cpanm” getaggte Einträge von rainboxx - Matthias Dietrich

Ever installed a Perl module on a Linux system? This is what a typical installation process looks like using the command line tool cpan:

Typical CPAN installation
While I can read and understand these lines, not every programmer -- in particular someone that is not using Perl on a regular basis -- cannot and is overextended by the massiv amount of text.

Since 2010 there is a really neat alternative to cpan called cpanminus. Excerpt from the docs:

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.

[...] For less experienced users (mostly from outside the Perl community), or even really experienced Perl developers who know how to shoot themselves in their feet, setting up the CPAN toolchain often feels like yak shaving, especially when all they want to do is just install some modules and start writing code.

So what's the difference? Less "line noise", easier, more lightweight!

If the module you're trying to install is already up to date it tells you this with only one line instead of 5 lines (ok, everyone should be able to read the 5 lines, too ;-)). Installing a module (here: Module::Build) gave me 5 lines of output while cpan has written a novel of 105 lines and using much more RAM and CPU.

I say give it a try by installing with the following single line on your terminal:
curl -L http://cpanmin.us | perl - --sudo App::cpanminus