Which cpan installer is the right one? (CPAN.pm/CPANPLUS/cpanminus)

Solution 1:

CPAN.pm (cpan) is the original client. It comes with Perl, so you already have it. It has the most features. It has a lot of configuration options to customize the way it works, though virtually everyone accepts the default installation. It integrates easily with local::lib.


cpanminus (cpanm) is an attempt to make a zero-configuration client that automatically does the right thing for most users. It's also designed to run well on systems with limited resources (e.g. a VPS). It doesn't come with Perl, but it's easy to install. It integrates easily with local::lib.

Its biggest limitation is its lack of configuration. If you want to do something unusual, it may not support it.


CPANPLUS (cpanp) is an attempt to make a CPAN API that Perl programs can use, instead of an app that you use from the command line. The cpanp shell is more of a proof-of-concept, and I don't know of any real advantages to using it.


In summary, I'd recommend either cpan or cpanm. If you have trouble configuring cpan, try cpanm. If your situation is unusual, try cpan.

Solution 2:

It's impossible answer this question because it is too subjective. :)

From my point of view: cpanm is the simplest way install perl modules. You can install cpanm with:

curl -L http://cpanmin.us | perl - --sudo App::cpanminus

and after it you can install modules with simple:

cpanm Some::Module

You can use cpanm for mirroring (part of) CPAN to you local machine too, so IMHO cpanm is the best for the most common CPAN needs.