This was explanation by Grant McLean
cpan the CPAN shell has been shipped with Perl since about 1997. When you run it the first time it asks a bunch of questions and saves the answers in a config file. Then you can install a module by running:
cpan -i Module::Name
The shell provides other commands for searching CPAN and looking inside distribution files.
A project to create a newer, better and more featureful CPAN shell called CPANPLUS (cpanp from the command-line) was started by Jos Boumans, but it was never quite completed to the point where the original vision had been realised.
cpanp i Module::Name
Meanwhile MIYAGAWA decided that cpanp was trying to do too much and what the world really needed was a simpler shell that did less and asked fewer questions (ideally none at all). He created App::cpanminus which provides the cpanm command and does exactly what he intended. You can use it to install a module (and all the module's dependencies) with a command like:
cpanm Module::Name
The main difference between the two is that if you have Perl you should already have the cpan command. Whereas you won't have cpanm unless/until you install it.
cpan -i App::cpanminus
System Perl:
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
User Perl (plenv, perlbrew)
curl -L https://cpanmin.us | perl - App::cpanminus
brew install cpanm
- General
- User Perl
- PerlBrew
- PLENV
- https://github.com/tokuhirom/plenv
- https://github.com/miyagawa/plenv-contrib
- http://www.dagolden.com/index.php/2390/setting-up-a-perl-development-environment-with-plenv/
- https://metacpan.org/pod/release/TOKUHIROM/App-plenv-v1.4.0/bin/plenv
- https://weblog.bulknews.net/plenv-alternative-for-perlbrew-7b5bf00a419e
- Mac
- Windows
The clarification that I need!
I had different behavior than what was pointed out as the main difference between cpan and cpanm, paying attention to the way I had installed Perl was the key to verify that cpanm need to be installed.
The installation using package manager of my OS leads to the mentioned behavior, installation using the asdf-vm the cpanm installation has already been performed when install some 5.X version of Perl, at least v5.30.3.