PM Reference

Perl module manager. Installs and manages CPAN modules for the active Perl version.

pm <command> [options]

Commands

install [module...]
Install one or more modules from CPAN. With no arguments, installs all modules listed in the cpanfile.
add [module]
Add a module to the cpanfile and install it. Records the dependency so pm sync and pm install will include it going forward.
remove [module]
Remove a module and uninstall it from the active Perl environment.
update [module...]
Update one or more modules to their latest available versions. With no arguments, updates all installed modules.
--all
Update every installed module.
--version <ver>
Update to a specific version.
--force
Reinstall even if the current version satisfies requirements.
--skip-tests
Skip the module test suite during installation.
list [pattern]
List installed modules. Accepts an optional glob pattern to filter results.
search [query]
Search available modules on CPAN. Returns module names, versions, and brief descriptions.
outdated
Show installed modules that have newer versions available on CPAN.
deps [module]
Show dependencies for a module. By default shows only runtime dependencies to a depth of one.
--include-test
Include test-phase dependencies.
--include-build
Include build-phase dependencies.
--include-core
Include modules that ship with Perl core.
--max-depth <n>
Recurse to at most n levels of transitive dependencies.
--flat
Print a flat list instead of a tree.
sync
Synchronize installed modules with the cpanfile.snapshot. Ensures the environment matches the locked dependency set exactly.
--generate-only
Regenerate the snapshot from the cpanfile without installing anything.
--install-only
Install from the existing snapshot without updating it.
--force
Reinstall all modules even if already present.
--dev
Include development dependencies declared in the cpanfile.
mirror [url]
Set or get the CPAN mirror. With a URL argument, sets the mirror. With no argument, prints the current mirror.
bundle export [file]
Export installed modules as a portable bundle archive.
--name <name>
Set a name for the bundle.
--description <text>
Set a description for the bundle.
--pattern <glob>
Limit the export to modules matching the given pattern.
bundle import [file]
Import and install modules from a bundle archive.
--verbose
Print each module as it is installed.
--force
Reinstall modules even if already present.
--skip-tests
Skip the test suite for each module during import.