CPM(1)

CPM(1) πŸ’– User Contributed Perl Documentation

okay so bestie, gather round 🫢 this is cpm, and it's literally the fast CPAN module installer. yes, like, actually fast. no cap. πŸ’… (also hi, it lives in the "User Contributed Perl Documentation" section of the manual, if you were wondering where we were at πŸ“–βœ¨)


✨ NAME ✨

cpm β€” a fast CPAN module installer πŸ”₯πŸ‘‘

like. it installs CPAN modules. quickly. that's the whole vibe. slay.


🌸 SYNOPSIS 🌸

here's the tea, bestie β€” look how pretty these all are πŸŽ€

# 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

# specify types/phases in cpmfile/cpanfile/metafile by "--with-*" and "--without-*" options
> cpm install --with-recommends --without-test

okay but the cat module-list.txt | cpm install - one?? iconic. piping your whole module list straight into it like it's nothing 🧚✨


πŸ’… OPTIONS πŸ’…

every single flag, no skips, no shortcuts, we are NOT gatekeeping 🫢

  • -w, --workers=N β€” how many workers you want running. default is 5. more workers = more chaos = more speed, go off πŸ’¨
  • -L, --local-lib-contained=DIR β€” the directory your modules get installed into. default is local/ 🏠
  • -g, --global β€” install modules into your current @INC instead of local/. the "no containment, we're free" option 🌈
  • -v, --verbose β€” verbose mode; you can see what is going on πŸ‘€ like, all of it. the whole plot.
  • --prebuilt, --no-prebuilt β€” save builds for CPAN distributions, and later, install the prebuilts if available. default is on ✨ you can also set $ENV{PERL_CPM_PREBUILT} false to disable this option. warning bestie: using --test and/or --man-pages disables this option. no prebuilts for you then πŸ’€
  • --target-perl=VERSION (EXPERIMENTAL) β€” install modules as if version is your perl is VERSION. yes it's experimental, tread lightly πŸ§ͺ
  • --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 πŸ—Ώ
  • -r, --resolver=class,args (EXPERIMENTAL, will be removed or renamed) β€” specify resolvers, you can use --resolver multiple times. available classes: metadb/metacpan/02packages/snapshot πŸ•΅οΈβ™€οΈ (heads up: experimental, it might get removed or renamed, so don't get too attached 😭)
  • --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. so basically: if you want only yours, you need this flag too, periodt 🚫
  • --reinstall β€” reinstall the distribution even if you already have the latest version installed. because sometimes you just gotta redo it, for the plot πŸ”
  • --dev (EXPERIMENTAL) β€” resolve TRIAL distributions too πŸ§ͺπŸ‘‘
  • --color, --no-color β€” turn on/off color output, default: on 🌈 (keep it on, it's cute)
  • --test, --no-test β€” run test cases, default: no πŸ§ͺ
  • --man-pages β€” generate man pages πŸ“š
  • --retry, --no-retry β€” retry configure/build/test/install if fails, default: retry πŸ” (never give up, never surrender)
  • --show-build-log-on-failure β€” show build.log on failure, default: off πŸ“„ (flip it on if you like receipts)
  • --configure-timeout=sec, --build-timeout=sec, --test-timeout=sec β€” specify configure/build/test timeout second, default: 60sec, 3600sec, 1800sec ⏰
  • --show-progress, --no-show-progress β€” show progress, default: on πŸ“Š (we love a progress bar moment)
  • --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 πŸŽ€
  • --with-requires, --without-requires (default: with) β€” turn requires on or off
  • --with-recommends, --without-recommends (default: without) β€” turn recommends on or off
  • --with-suggests, --without-suggests (default: without) β€” turn suggests on or off
  • --with-configure, --without-configure (default: without) β€” turn configure on or off
  • --with-build, --without-build (default: with) β€” turn build on or off
  • --with-test, --without-test (default: with) β€” turn test on or off
  • --with-runtime, --without-runtime (default: with) β€” turn runtime on or off
  • --with-develop, --without-develop (default: without) β€” turn develop on or off

all of these specify types/phases of dependencies in cpmfile/cpanfile/metafile to be installed πŸ’–

  • --with-all β€” shortcut for --with-requires, --with-recommends, --with-suggests, --with-configure, --with-build, --with-test, --with-runtime and --with-develop. the "give me everything, I want it all" button πŸ‘‘βœ¨

Copyright 2015 Shoichi Kaji <skaji@cpan.org> πŸ’œ

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


okay bestie that's the whole page 🫢 go install something, you're gonna do amazing, fr fr πŸŒΈπŸ’–

this lil manual moment came to you via perl v5.42.0, dated 2026-01-16 πŸŽ€ mwah, go slay βœ¨πŸ’…

πŸ“¦ where this page comes from