Additionally, you can use the notation using ~ and @ to specify version for a given module. ~ specifies the version requirement in the CPAN::Meta::Spec format, while @ pins the exact version, and is a shortcut for ~"== VERSION".

The version query including specific version or range will be sent to MetaCPAN to search for previous releases. The query will search for BackPAN archives by default, unless you specify --dev option, in which case, archived versions will be filtered out.

For a git repository, you can specify a branch, tag, or commit SHA to build. The default is master

EXPERIMENTAL: Uninstalls the modules. Will remove the distribution files from your library path using the .packlist file.

When used with -l or -L, only the files under the local::lib directory will be removed.

NOTE: If you have the "dual-life" module in multiple locations (i.e. site_perl and perl library path, with perl 5.12 or later), only the files in site_perl will be deleted.

If the distribution has bin scripts and man, they will be kept in case the core installation still references that, although there's no guarantee that the script will continue working as expected with the older version of .pm files.

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.

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.

You can use a local directory that has a CPAN mirror structure (created by tools such as OrePAN or Pinto) by using a special URL scheme file://. If the given URL begins with `/` (without any scheme), it is considered as a file scheme as well.

Download the mirror's 02packages.details.txt.gz index file instead of querying the CPAN Meta DB. This will also effectively opt out sending your local perl versions to backend database servers such as CPAN Meta DB and MetaCPAN.

Select this option if you are using a local mirror of CPAN, such as minicpan when you're offline, or your own CPAN index (a.k.a darkpan).

Tip: It might be useful if you name these mirror options with your shell aliases, like:

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.

Scans the depencencies of given modules and output the tree in a text format. (See --format below for more options)

Because this command doesn't actually install any distributions, it will be useful that by typing:

cpanm --scandeps Catalyst::Runtime

you can make sure what modules will be installed.

This command takes into account which modules you already have installed in your system. If you want to see what modules will be installed against a vanilla perl installation, you might want to combine it with -L option.

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 if your perl version is smaller than 5.12, and you can disable that with --no-uninst-shadows.

NOTE: Since version 1.3000 this flag is turned off by default for perl newer than 5.12, since with 5.12 @INC contains site_perl directory before the perl core library path, and uninstalling shadows is not necessary anymore and does more harm by deleting files from the core library path.

EXPERIMENTAL: Specifies whether a module (and version) given in the command line is skipped if it's already installed.

If you run:

cpanm --skip-satisfied CGI DBI~1.2

cpanm won't install them if you already have CGI (for whatever versions) or have DBI with version higher than 1.2. It is similar to --skip-installed but while --skip-installed checks if the latest version of CPAN is installed, --skip-satisfied checks if a requested version (or not, which means any version) is installed.

Uses GNU Wget (if available) to download stuff. Defaults to true, and you can say --no-wget to disable using Wget (versions of Wget older than 1.9 don't support the --retry-connrefused option used by cpanm).