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 is5. more workers = more chaos = more speed, go off π¨-L,--local-lib-contained=DIRβ the directory your modules get installed into. default islocal/π-g,--globalβ install modules into your current@INCinstead oflocal/. 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--testand/or--man-pagesdisables this option. no prebuilts for you then π--target-perl=VERSION(EXPERIMENTAL) β install modules as if version is your perl isVERSION. yes it's experimental, tread lightly π§ͺ--mirror=URLβ base url for the CPAN mirror to use. cannot be used multiple times β use--resolverinstead. 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--resolvermultiple 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-resolverstoo. 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β showbuild.logon 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β specifycpanfile.snapshotpath, 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--featuremultiple 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-runtimeand--with-develop. the "give me everything, I want it all" button πβ¨
π COPYRIGHT AND LICENSE π
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
- fedora 44: perl-App-cpm 0.998.3-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms