cpanm
TLDR
Install a Perl module
SYNOPSIS
cpanm [options] Module...
DESCRIPTION
cpanm (cpanminus) is a script to install Perl modules from CPAN (Comprehensive Perl Archive Network). It provides a simpler, faster alternative to the traditional CPAN shell with minimal dependencies and configuration.
The tool automatically resolves and installs dependencies, downloads modules from CPAN mirrors, runs tests, and installs to the appropriate location. It supports local::lib for user-local installations without root privileges.
cpanm can install modules by name, from tarballs, from Git repositories, or from URLs. The cpanfile format allows declaring project dependencies that cpanm can install with --installdeps.
PARAMETERS
-l, --local-lib path
Install modules to local directory.-L, --local-lib-contained path
Install to directory with contained dependencies.-n, --notest
Skip running tests.-q, --quiet
Quiet output.-v, --verbose
Verbose output.-f, --force
Force install even if tests fail.-U, --uninstall
Uninstall module.--installdeps
Install dependencies only.--info
Show module information without installing.--look
Download and unpack, then open shell.--mirror url
CPAN mirror URL.--sudo
Use sudo for installation.
CAVEATS
Installing globally requires root privileges unless using local::lib. Some modules have system dependencies (libraries, headers) that must be installed separately. Test failures may indicate incompatible system configurations. The --notest flag should be used cautiously as it may install broken modules.
HISTORY
cpanminus was created by Tatsuhiko Miyagawa in 2010 as a zero-configuration CPAN installer. Frustrated with the complexity of CPAN.pm and CPANPLUS, he designed cpanm to "just work" with sensible defaults. It became the de facto standard for installing Perl modules, valued for its simplicity and speed.
SEE ALSO
cpan(1), carton(1), perl(1), local::lib(3pm)


