The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

cpanm - get, unpack build and install modules from CPAN

SYNOPSIS

  cpanm Test::More                                          # install Test::More
  cpanm MIYAGAWA/Plack-0.99_05.tar.gz                       # full distribution path
  cpanm http://example.org/LDS/CGI.pm-3.20.tar.gz           # install from URL
  cpanm ~/dists/MyCompany-Enterprise-1.00.tar.gz            # install from a local file
  cpanm --interactive Task::Kensho                          # Configure interactively
  cpanm .                                                   # install from local directory
  cpanm --installdeps .                                     # install all the deps for the current directory
  cpanm -L extlib Plack                                     # install Plack and all non-core deps into extlib
  cpanm --mirror http://cpan.cpantesters.org/ DBI           # use the fast-syncing mirror

COMMANDS

-i, --install

Installs the modules. This is a default behavior and this is just a compatibility option to make it work like cpan or cpanp.

--self-upgrade

Upgrades itself. It's just an alias for:

  cpanm --skip-installed App::cpanminus
--info

Displays the distribution information in AUTHOR/Dist-Name-ver.tar.gz format in the standard out.

--installdeps

Installs the dependencies of the target distribution but won't build itself. Handy if you want to try the application from a version controlled repository such as git.

  cpanm --installdeps .
--look

Download and unpack the distribution and then open the directory with your shell. Handy to poke around the source code or do the manual testing.

-h, --help

Displays the help message.

-V, --version

Displays the version number.

OPTIONS

You can specify the default options in PERL_CPANM_OPT environment variable.

-f, --force

Force install modules even when testing failed.

Defaults to false, and you can say --no-force to override when it is set in the default options in PERL_CPANM_OPT.

-n, --notest

Skip the testing of modules. Use this only when you just want to save time for installing hundreds of distributions to the same perl and architecture you've already tested to make sure it builds fine.

Defaults to false, and you can say --no-notest to override when it is set in the default options in PERL_CPANM_OPT.

-S, --sudo

Switch to the root user with sudo when installing modules. Use this if you want to install modules to the system perl include path.

Defaults to false, and you can say --no-sudo to override when it is set in the default options in PERL_CPANM_OPT.

-v, --verbose

Makes the output verbose. It also enables the interactive configuration. (See --interactive)

-q, --quiet

Makes the output even more quiet than the default. It doesn't print anything to the STDERR.

-l, --local-lib

Sets the local::lib compatible path to install modules to. You don't need to set this if you already configure the shell environment variables using local::lib, but this can be used to override that as well.

-L, --local-lib-contained

Same with --local-lib but when examining the dependencies, it assumes no non-core modules are installed on the system. It's handy if you want to bundle application dependencies in one directory so you can distribute to other machines.

For instance,

  cpanm -L extlib Plack

would install Plack and all of its non-core dependencies into the directory extlib, which can be loaded from your application with:

  use local::lib '/path/to/extlib';
--mirror

Specifies the base URL for the CPAN mirror to use, such as http://cpan.cpantesters.org/ (you can omit the trailing slash). You can specify multiple mirror URLs by repeating the command line option.

Defaults to http://search.cpan.org/CPAN which is a geo location aware redirector.

--prompt

Prompts when a test fails so that you can skip, force install, retry or look in the shell to see what's going wrong. It also prompts when one of the dependency failed if you want to proceed the installation.

Defaults to false, and you can say --no-prompt to override if it's set in the default options in PERL_CPANM_OPT.

--skip-installed

cpanm by default reinstalls the given module even if the latest version is already installed. This option makes it check the installed version first and skips if it's already the latest.

Defaults to false, and you can say --no-skip-installed to override when it's set in the default options in PERL_CPANM_OPT.

--interactive

Makes the configuration (such as Makefile.PL and Build.PL) interactive, so you can answer questions in the distribution that requires custom configuration or Task:: distributions.

Defaults to false, and you can say --no-interactive to override when it's set in the default options in PERL_CPANM_OPT.

--uninst-shadows

Uninstalls the shadow files of the distribution that you're installing. This eliminates the confusion if you're trying to install core (dual-life) modules from CPAN against perl 5.10 or older, or modules that used to be XS-based but switched to pure perl at some version.

If you run cpanm as root and use INSTALL_BASE or equivalent to specify custom installation path, you SHOULD disable this option so you won't accidentally uninstall dual-life modules from the core include path.

Defaults to true, and you can disable that with --no-uninst-shadows.

--lwp

Uses LWP module to download stuff over HTTP. Defaults to true, and you can say --no-lwp to disable using LWP, when you want to upgrade LWP from CPAN on some broken perl systems.

SEE ALSO

App::cpanminus

COPYRIGHT

Copyright 2010 Tatsuhiko Miyagawa.

AUTHOR

Tatsuhiko Miyagawa