1CPAN2DIST(1)          User Contributed Perl Documentation         CPAN2DIST(1)
2
3
4

NAME

6       cpan2dist - The CPANPLUS distribution creator
7

DESCRIPTION

9       This script will create distributions of "CPAN" modules of the format
10       you specify, including its prerequisites. These packages can then be
11       installed using the corresponding package manager for the format.
12
13       Note, you can also do this interactively from the default shell,
14       "CPANPLUS::Shell::Default". See the "CPANPLUS::Dist" documentation, as
15       well as the documentation of your format of choice for any format
16       specific documentation.
17

USAGE

19        Usage: cpan2dist [--format FMT] [OPTS] Mod::Name [Mod::Name, ...]
20               cpan2dist [--format FMT] [OPTS] --modulelist /tmp/mods.list
21               cpan2dist [--format FMT] [OPTS] --archive /tmp/dist [/tmp/dist2]
22
23           Will create a distribution of type FMT of the modules
24           specified on the command line, and all their prerequisites.
25
26           Can also create a distribution of type FMT from a local
27           archive and all of its prerequisites.
28
29       Options:
30
31           ### take no argument:
32           --help          Show this help message
33           --install       Install this package (and any prerequisites you built)
34                           after building it.
35           --skiptest      Skip tests. Can be negated using --noskiptest
36           --force         Force operation. Can be negated using --noforce
37           --verbose       Be verbose. Can be negated using --noverbose
38           --keepsource    Keep sources after building distribution. Can be
39                           negated by --nokeepsource. May not be supported
40                           by all formats
41           --makefile      Prefer Makefile.PL over Build.PL. Can be negated
42                           using --nomakefile. Defaults to your config setting
43           --buildprereq   Build packages of any prerequisites, even if they are
44                           already uptodate on the local system. Can be negated
45                           using --nobuildprereq. Defaults to false.
46           --archive       Indicate that all modules listed are actually archives
47           --flushcache    Update CPANPLUS' cache before commencing any operation
48           --defaults      Instruct ExtUtils::MakeMaker and Module::Build to use
49                           default answers during 'perl Makefile.PL' or 'perl
50                           Build.PL' calls where possible
51           --edit-metafile Edit the distributions metafile(s) before the distribution
52                           is built. Requires a configured editor.
53
54           ### take argument:
55           --format      Installer format to use (defaults to config setting)
56           --ban         Patterns of module names to skip during installation,
57                         case-insensitive (affects prerequisites too)
58                         May be given multiple times
59           --banlist     File containing patterns that could be given to --ban
60                         Are appended to the ban list built up by --ban
61                         May be given multiple times.
62           --ignore      Patterns of modules to exclude from prereq list. Useful
63                         for when a prereq listed by a CPAN module is resolved
64                         in another way than from its corresponding CPAN package
65                         (Match is done on both module name, and package name of
66                         the package the module is in, case-insensitive)
67           --ignorelist  File containing patterns that may be given to --ignore.
68                         Are appended to the ban list built up by --ignore.
69                         May be given multiple times.
70           --modulelist  File containing a list of modules that should be built.
71                         Are appended to the list of command line modules.
72                         May be given multiple times.
73           --logfile     File to log all output to. By default, all output goes
74                         to the console.
75           --timeout     The allowed time for building a distribution before
76                         aborting. This is useful to terminate any build that
77                         hang or happen to be interactive despite being told not
78                         to be. Defaults to 300 seconds. To turn off, you can
79                         set it to 0.
80           --set-config  Change any options as specified in your config for this
81                         invocation only. See CPANPLUS::Config for a list of
82                         supported options.
83           --set-program Change any programs as specified in your config for this
84                         invocation only. See CPANPLUS::Config for a list of
85                         supported programs.
86           --dist-opts   Arbitrary options passed along to the chosen installer
87                         format's prepare()/create() routine. Please see the
88                         documentation of the installer of your choice for
89                         options it accepts.
90
91           ### builtin lists
92           --default-banlist    Use our builtin banlist. Works just like --ban
93                                and --banlist, but with pre-set lists. See the
94                                "Builtin Lists" section for details.
95           --default-ignorelist Use our builtin ignorelist. Works just like
96                                --ignore and --ignorelist but with pre-set lists.
97                                See the "Builtin Lists" section for details.
98
99       Examples:
100
101           ### build a debian package of DBI and its prerequisites,
102           ### don't bother running tests
103           cpan2dist --format CPANPLUS::Dist::Deb --buildprereq --skiptest DBI
104
105           ### build a debian package of DBI and its prerequisites and install them
106           cpan2dist --format CPANPLUS::Dist::Deb --buildprereq --install DBI
107
108           ### Build a package, whose format is determined by your config, of
109           ### the local tarball, reloading cpanplus' indices first and using
110           ### the tarballs Makefile.PL if it has one.
111           cpan2dist --makefile --flushcache --archive /path/to/Cwd-1.0.tgz
112
113           ### build a package from Net::FTP, but don't build any packages or
114           ### dependencies whose name match 'Foo', 'Bar' or any of the
115           ### patterns mentioned in /tmp/ban
116           cpan2dist --ban Foo --ban Bar --banlist /tmp/ban Net::FTP
117
118           ### build a package from Net::FTP, but ignore its listed dependency
119           ### on IO::Socket, as it's shipped per default with the OS we're on
120           cpan2dist --ignore IO::Socket Net::FTP
121
122           ### building all modules listed, plus their prerequisites
123           cpan2dist --ignorelist /tmp/modules.ignore --banlist /tmp/modules.ban
124             --modulelist /tmp/modules.list --buildprereq --flushcache
125             --makefile --defaults
126
127           ### pass arbitrary options to the format's prepare()/create() routine
128           cpan2dist --dist-opts deb_version=3 --dist-opts prefix=corp
129

Built-In Filter Lists

131       Some modules you'd rather not package. Some because they are part of
132       core-perl and you don't want a new package.  Some because they won't
133       build on your system. Some because your package manager of choice
134       already packages them for you.
135
136       There may be a myriad of reasons. You can use the "--ignore" and
137       "--ban" options for this, but we provide some built-in lists that catch
138       common cases. You can use these built-in lists if you like, or supply
139       your own if need be.
140
141   Built-In Ignore List
142       You can use this list of regexes to ignore modules matching to be
143       listed as prerequisites of a package. Particularly useful if they are
144       bundled with core-perl anyway and they have known issues building.
145
146       Toggle it by supplying the "--default-ignorelist" option.
147
148           ^IO$                    # Provided with core anyway
149           ^Cwd$                   # Provided with core anyway
150           ^File::Spec             # Provided with core anyway
151           ^Config$                # Perl's own config, not shipped separately
152           ^ExtUtils::MakeMaker$   # Shipped with perl, recent versions
153                                   # have bug 14721 (see rt.cpan.org)
154           ^ExtUtils::Install$     # Part of of EU::MM, same reason
155
156   Built-In Ban list
157       You can use this list of regexes to disable building of these modules
158       altogether.
159
160       Toggle it by supplying the "--default-banlist" option.
161
162           ^GD$                # Needs c libraries
163           ^Berk.*DB           # DB packages require specific options & linking
164           ^DBD::              # DBD drivers require database files/headers
165           ^XML::              # XML modules usually require expat libraries
166           Apache              # These usually require apache libraries
167           SSL                 # These usually require SSL certificates & libs
168           Image::Magick       # Needs ImageMagick C libraries
169           Mail::ClamAV        # Needs ClamAV C Libraries
170           ^Verilog            # Needs Verilog C Libraries
171           ^Authen::PAM$       # Needs PAM C libraries & Headers
172

SEE ALSO

174       CPANPLUS::Dist, CPANPLUS::Module, CPANPLUS::Shell::Default, "cpanp"
175

BUG REPORTS

177       Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>.
178

AUTHOR

180       This module by Jos Boumans <kane@cpan.org>.
181
183       The CPAN++ interface (of which this module is a part of) is copyright
184       (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved.
185
186       This library is free software; you may redistribute and/or modify it
187       under the same terms as Perl itself.
188
189
190
191perl v5.30.2                      2020-04-14                      CPAN2DIST(1)
Impressum