1CPM(1) User Contributed Perl Documentation CPM(1)
2
3
4
6 cpm - a fast CPAN module installer
7
9 # install modules into local/
10 > cpm install Module1 Module2 ...
11
12 # install modules with verbose messages
13 > cpm install -v Module
14
15 # from cpmfile/cpanfile (with cpanfile.snapshot if any)
16 > cpm install
17
18 # from metafile (META.json or MYMETA.json)
19 > perl Makefile.PL && cpm install --metafile MYMETA.json
20
21 # install module into current @INC instead of local/
22 > cpm install -g Module
23
24 # read modules from STDIN by specifying "-" as an argument
25 > echo Module1 Module2 | cpm install -
26
27 # prefer TRIAL release
28 > cpm install --dev Moose
29
30 # install modules as if version of your perl is 5.8.5
31 # so that modules which are not core in 5.8.5 will be installed
32 > cpm install --target-perl 5.8.5
33
34 # resolve distribution names from DARKPAN/modules/02packages.details.txt.gz
35 # and fetch distibutions from DARKPAN/authors/id/...
36 > cpm install --resolver 02packages,http://example.com/darkpan Your::Module
37 > cpm install --resolver 02packages,file:///path/to/darkpan Your::Module
38
39 # specify types/phases in cpmfile/cpanfile/metafile by "--with-*" and "--without-*" options
40 > cpm install --with-recommends --without-test
41
43 -w, --workers=N
44 number of workers, default: 5
45 -L, --local-lib-contained=DIR
46 directory to install modules into, default: local/
47 -g, --global
48 install modules into current @INC instead of local/
49 -v, --verbose
50 verbose mode; you can see what is going on
51 --prebuilt, --no-prebuilt
52 save builds for CPAN distributions; and later, install the prebuilts if available
53 default: on; you can also set $ENV{PERL_CPM_PREBUILT} false to disable this option
54 --target-perl=VERSION (EXPERIMENTAL)
55 install modules as if verison is your perl is VERSION
56 --mirror=URL
57 base url for the CPAN mirror to use, cannot be used multiple times. Use --resolver instead.
58 default: https://cpan.metacpan.org
59 --pp, --pureperl-only
60 prefer pureperl only build
61 --static-install, --no-static-install
62 enable/disable the static install, default: enable
63 -r, --resolver=class,args (EXPERIMENTAL, will be removed or renamed)
64 specify resolvers, you can use --resolver multiple times
65 available classes: metadb/metacpan/02packages/snapshot
66 --no-default-resolvers
67 even if you specify --resolver, cpm continues using the default resolvers.
68 if you just want to use your resolvers specifed by --resolver,
69 you should specify --no-default-resolvers too
70 --reinstall
71 reinstall the distribution even if you already have the latest version installed
72 --dev (EXPERIMENTAL)
73 resolve TRIAL distributions too
74 --color, --no-color
75 turn on/off color output, default: on
76 --test, --no-test
77 run test cases, default: no
78 --man-pages
79 generate man pages
80 --retry, --no-retry
81 retry configure/build/test/install if fails, default: retry
82 --show-build-log-on-failure
83 show build.log on failure, default: off
84 --configure-timeout=sec, --build-timeout=sec, --test-timeout=sec
85 specify configure/build/test timeout second, default: 60sec, 3600sec, 1800sec
86 --show-progress, --no-show-progress
87 show progress, default: on
88 --cpmfile=path
89 specify cpmfile path, default: ./cpm.yml
90 --cpanfile=path
91 specify cpanfile path, default: ./cpanfile
92 --metafile=path
93 specify META file path, default: N/A
94 --snapshot=path
95 specify cpanfile.snapshot path, default: ./cpanfile.snapshot
96 -V, --version
97 show version
98 -h, --help
99 show this help
100 --feature=identifier
101 specify the feature to enable in cpmfile/cpanfile/metafile; you can use --feature multiple times
102 --with-requires, --without-requires (default: with)
103 --with-recommends, --without-recommends (default: without)
104 --with-suggests, --without-suggests (default: without)
105 --with-configure, --without-configure (default: without)
106 --with-build, --without-build (default: with)
107 --with-test, --without-test (default: with)
108 --with-runtime, --without-runtime (default: with)
109 --with-develop, --without-develop (default: without)
110 specify types/phases of dependencies in cpmfile/cpanfile/metafile to be installed
111 --with-all
112 shortcut for --with-requires, --with-recommends, --with-suggests,
113 --with-configure, --with-build, --with-test, --with-runtime and --with-develop
114
116 Copyright 2015 Shoichi Kaji <skaji@cpan.org>
117
118 This library is free software; you can redistribute it and/or modify it
119 under the same terms as Perl itself.
120
121
122
123perl v5.38.0 2023-08-14 CPM(1)