1CPAN(1) Perl Programmers Reference Guide CPAN(1)
2
3
4
6 cpan - easily interact with CPAN from the command line
7
9 # with arguments and no switches, installs specified modules
10 cpan module_name [ module_name ... ]
11
12 # with switches, installs modules with extra behavior
13 cpan [-cfimt] module_name [ module_name ... ]
14
15 # without arguments, starts CPAN.pm shell
16 cpan
17
18 # without arguments, but some switches
19 cpan [-ahrvACDLO]
20
22 This script provides a command interface (not a shell) to CPAN. At the
23 moment it uses CPAN.pm to do the work, but it is not a one-shot command
24 runner for CPAN.pm.
25
26 Meta Options
27 These options are mutually exclusive, and the script processes them in
28 this order: [hvCAar]. Once the script finds one, it ignores the
29 others, and then exits after it finishes the task. The script ignores
30 any other command line options.
31
32 -a Creates the CPAN.pm autobundle with CPAN::Shell->autobundle.
33
34 -A module [ module ... ]
35 Shows the primary maintainers for the specified modules
36
37 -C module [ module ... ]
38 Show the "Changes" files for the specified modules
39
40 -D module [ module ... ]
41 Show the module details. This prints one line for each out-of-date
42 module (meaning, modules locally installed but have newer versions
43 on CPAN). Each line has three columns: module name, local version,
44 and CPAN version.
45
46 -L author [ author ... ]
47 List the modules by the specified authors.
48
49 -h Prints a help message.
50
51 -O Show the out-of-date modules.
52
53 -r Recompiles dynamically loaded modules with CPAN::Shell->recompile.
54
55 -v Print the script version and CPAN.pm version.
56
57 Module options
58 These options are mutually exclusive, and the script processes them in
59 alphabetical order. It only processes the first one it finds.
60
61 c Runs a `make clean` in the specified module's directories.
62
63 f Forces the specified action, when it normally would have failed.
64
65 i Installed the specified modules.
66
67 m Makes the specified modules.
68
69 t Runs a `make test` on the specified modules.
70
71 Examples
72 # print a help message
73 cpan -h
74
75 # print the version numbers
76 cpan -v
77
78 # create an autobundle
79 cpan -a
80
81 # recompile modules
82 cpan -r
83
84 # install modules ( sole -i is optional )
85 cpan -i Netscape::Booksmarks Business::ISBN
86
87 # force install modules ( must use -i )
88 cpan -fi CGI::Minimal URI
89
92 * none noted
93
95 Most behaviour, including environment variables and configuration,
96 comes directly from CPAN.pm.
97
99 This source is part of a SourceForge project which always has the
100 latest sources in CVS, as well as all of the previous releases.
101
102 http://sourceforge.net/projects/brian-d-foy/
103
104 If, for some reason, I disappear from the world, one of the other
105 members of the project can shepherd this module appropriately.
106
108 Japheth Cleaver added the bits to allow a forced install (-f).
109
110 Jim Brandt suggest and provided the initial implementation for the up-
111 to-date and Changes features.
112
113 Adam Kennedy pointed out that exit() causes problems on Windows where
114 this script ends up with a .bat extension
115
117 brian d foy, "<bdfoy@cpan.org>"
118
120 Copyright (c) 2001-2006, brian d foy, All Rights Reserved.
121
122 You may redistribute this under the same terms as Perl itself.
123
124
125
126perl v5.10.1 2017-03-22 CPAN(1)