OS Manuals

/usr/bin/cpm

get, unpack, build and install modules from CPAN

From perl-app-cpm 1.1.6-r1 (os), captured 2026-11-05 by running cpm --help (exit 0). permalink

Usage: cpm install [OPTIONS...] ARGV...

Examples:
  # install modules into local/
  > cpm install Module1 Module2 ...

  # install modules from one of
  #  * cpm.yml
  #  * cpanfile
  #  * META.json (with dynamic_config false)
  #  * Build.PL
  #  * Makefile.PL
  > cpm install

  # install module into current @INC instead of local/
  > cpm install -g Module

  # read modules from STDIN by specifying "-" as an argument
  > cat module-list.txt | cpm install -

  # prefer TRIAL release
  > cpm install --dev Moose

  # install modules as if version of your perl is 5.8.5
  # so that modules which are not core in 5.8.5 will be installed
  > cpm install --target-perl 5.8.5

  # resolve distribution names from DARKPAN/modules/02packages.details.txt.gz
  # and fetch distributions from DARKPAN/authors/id/...
  > cpm install --resolver 02packages,http://example.com/darkpan Your::Module
  > cpm install --resolver 02packages,file:///path/to/darkpan    Your::Module

  # read requires and recommends from the top-level cpanfile/cpmfile/metafile input
  > cpm install --top-level-relationship requires,recommends

  # read only runtime requirements from the top-level cpanfile/cpmfile/metafile input
  > cpm install --top-level-phase runtime

Options:
  -w, --workers=N
        number of workers, default: 5
  -L, --local-lib-contained=DIR
        directory to install modules into, default: local/
  -g, --global
        install modules into current @INC instead of local/
  -v, --verbose
        verbose mode; you can see what is going on
      --prebuilt, --no-prebuilt
        save builds for CPAN distributions; and later, install the prebuilts if available
        default: on; you can also set $ENV{PERL_CPM_PREBUILT} false to disable this option.
        usage of --test, --man-pages, and/or --use-install-command disables this option.
      --target-perl=VERSION  (EXPERIMENTAL)
        install modules as if version is your perl is VERSION
      --mirror=URL
        base url for the CPAN mirror to use, cannot be used multiple times. Use --resolver instead.
        default: https://cpan.metacpan.org
      --pp, --pureperl-only
        prefer pureperl only build
      --static-install, --no-static-install
        enable/disable the static install, default: enable
      --final-install=runtime|all
        select which dependency-ready distributions are finally installed:
          runtime  install the requested targets and their runtime dependencies
          all      install every dependency-ready distribution
        default: runtime
      --use-install-command, --no-use-install-command
        use make install or ./Build install for final installation when available.
        default: off
  -r, --resolver=class,args (EXPERIMENTAL, will be removed or renamed)
        specify resolvers, you can use --resolver multiple times
        available classes: metadb/metacpan/02packages/snapshot
      --no-default-resolvers
        even if you specify --resolver, cpm continues using the default resolvers.
        if you just want to use your resolvers specified by --resolver,
        you should specify --no-default-resolvers too
      --reinstall
        reinstall the distribution even if you already have the latest version installed
      --dev (EXPERIMENTAL)
        resolve TRIAL distributions too
      --color, --no-color
        turn on/off color output, default: on
      --test, --no-test
        run test cases, default: no
      --man-pages
        generate man pages
      --retry, --no-retry
        no-op compatibility option, will be removed in a future release
      --show-build-log-on-failure
        show build.log on failure, default: off
      --report-perl-version, --no-report-perl-version
        report your local perl version as part of User-Agent, default: on unless CI is enabled
      --configure-timeout=sec, --build-timeout=sec, --test-timeout=sec
        specify configure/build/test timeout second, default: 60sec, 3600sec, 1800sec
      --progress=auto|tty|plain
        select the progress mode:
          auto  choose tty for interactive non-Windows non-CI non-verbose terminals, otherwise plain
          tty   use the terminal progress UI
          plain use plain line-by-line progress output
        default: auto
      --show-progress, --no-show-progress
        no-op compatibility options; use --progress instead
      --cpmfile=path
        specify cpmfile path, default: ./cpm.yml
      --cpanfile=path
        specify cpanfile path, default: ./cpanfile
      --metafile=path
        specify META file path, default: N/A
      --snapshot=path
        specify cpanfile.snapshot path, default: ./cpanfile.snapshot
  -V, --version
        show version
  -h, --help
        show this help
      --feature=identifier
        specify the feature to enable in cpmfile/cpanfile/metafile; you can use --feature multiple times
      --top-level-phase=phase
        select phases from the top-level cpmfile/cpanfile/metafile input;
        specifying this option replaces the default phase selection;
        use a comma-separated list like configure,test
        default: configure,build,test,runtime,develop
      --top-level-relationship=relationship
        select relationships from the top-level cpmfile/cpanfile/metafile input;
        specifying this option replaces the default relationship selection;
        use a comma-separated list like requires,recommends
        default: requires
      --with-requires,   --without-requires   (default: with)
      --with-recommends, --without-recommends (default: without)
      --with-suggests,   --without-suggests   (default: without)
      --with-configure,  --without-configure  (default: with)
      --with-build,      --without-build      (default: with)
      --with-test,       --without-test       (default: with)
      --with-runtime,    --without-runtime    (default: with)
      --with-develop,    --without-develop    (default: without)
        deprecated compatibility options for top-level dependency selection
      --with-all
        shortcut for --with-requires, --with-recommends, --with-suggests,
        --with-configure, --with-build, --with-test, --with-runtime and --with-develop
        you can also use --top-level-phase/--top-level-relationship instead
      --experimental-config=path
        load distribution-specific installation settings from a YAML file (experimental)
Options (41)
OptionDescriptionSource
-w, --workers Nnumber of workers, default: 5help
-L, --local-lib-contained DIRdirectory to install modules into, default: local/help
-g, --globalinstall modules into current @INC instead of local/help
-v, --verboseverbose mode;help
--prebuilt, --no-prebuiltsave builds for CPAN distributions;help
--target-perl VERSION(EXPERIMENTAL) install modules as if version is your perl is VERSIONhelp
--mirror URLbase url for the CPAN mirror to use, cannot be used multiple times.help
--pp, --pureperl-onlyprefer pureperl only buildhelp
--static-install, --no-static-installenable/disable the static install, default: enablehelp
--final-install runtime|allselect which dependency-ready distributions are finally installed: runtime install the requested targets and their runtime dependencies all install every dependency-ready distribution default: runtimehelp
--use-install-command, --no-use-install-commanduse make install or ./Build install for final installation when available.help
--no-default-resolverseven if you specify --resolver, cpm continues using the default resolvers.help
--reinstallreinstall the distribution even if you already have the latest version installedhelp
--dev (EXPERIMENTAL)resolve TRIAL distributions toohelp
--color, --no-colorturn on/off color output, default: onhelp
--test, --no-testrun test cases, default: nohelp
--man-pagesgenerate man pageshelp
--retry, --no-retryno-op compatibility option, will be removed in a future releasehelp
--show-build-log-on-failureshow build.log on failure, default: offhelp
--report-perl-version, --no-report-perl-versionreport your local perl version as part of User-Agent, default: on unless CI is enabledhelp
--configure-timeout, --build-timeout, --test-timeout secspecify configure/build/test timeout second, default: 60sec, 3600sec, 1800sechelp
--progress auto|tty|plainselect the progress mode: auto choose tty for interactive non-Windows non-CI non-verbose terminals, otherwise plain tty use the terminal progress UI plain use plain line-by-line progress output…help
--show-progress, --no-show-progressno-op compatibility options;help
--cpmfile pathspecify cpmfile path, default: ./cpm.ymlhelp
--cpanfile pathspecify cpanfile path, default: ./cpanfilehelp
--metafile pathspecify META file path, default: N/Ahelp
--snapshot pathspecify cpanfile.snapshot path, default: ./cpanfile.snapshothelp
-V, --versionshow versionhelp
-h, --helpshow this helphelp
--feature identifierspecify the feature to enable in cpmfile/cpanfile/metafile;help
--top-level-phase phaseselect phases from the top-level cpmfile/cpanfile/metafile input;help
--top-level-relationship relationshipselect relationships from the top-level cpmfile/cpanfile/metafile input;help
--with-requires--without-requires (default: with)help
--with-suggests--without-suggests (default: without)help
--with-configure--without-configure (default: with)help
--with-build--without-build (default: with)help
--with-test--without-test (default: with)help
--with-runtime--without-runtime (default: with)help
--with-develop--without-develop (default: without) deprecated compatibility options for top-level dependency selectionhelp
--with-allshortcut for --with-requires, --with-recommends, --with-suggests,help
--experimental-config pathload distribution-specific installation settings from a YAML file (experimental)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.