There are multiple installers for cpan modules available; I know of at least CPAN.pm (comes with perl,) CPANPLUS, and cpanminus.
What is the difference between the three?
What situations call for using one over the other?
Are there other module installers I should know about?
Best Answer
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. Thecpanp
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
orcpanm
. If you have trouble configuringcpan
, trycpanm
. If your situation is unusual, trycpan
.