Usage
To install a module (assuming cpanm is already installed):
cpanm Data::Section
cpanm ("cpanminus") strives to be less verbose than cpan but still captures all of the installation information in a log file in case it is needed. It also handles many "interactive questions" for you, whereas cpan doesn't.
cpanm is also popular for installing dependencies of a project from, e.g., GitHub. Typical use is to first cd into the project's root, then run
cpanm --installdeps .
With --installdeps it will:
perl Build.PL), generating MYMETA filesTo specify the file 'some.cpanfile', containing the dependencies, run:
cpanm --installdeps --cpanfile some.cpanfile .
cpanm Installation
There are several ways to install it. Here's installation via cpan:
cpan App::cpanminus
cpanm Configuration
There is no config file for cpanm. Rather, it relies on the following environment variables for its configuration:
PERL_CPANM_OPT (General cpanm command line options)
export PERL_CPANM_OPT="--prompt" # in .bashrc, to enable prompting, e.g.setenv PERL_CPANM_OPT "--prompt" # in .tcshrcPERL_MM_OPT (ExtUtils::MakeMaker command line options, affects module install target)PERL_MB_OPT (Module::Build command line options, affects module install target)