- SEE ALSO
cpackage - Create installation packages from CPAN modules
cpackage My::CPAN::Module cpackage --mirror http://cpan.local --mirror-only My::Private::Module
cpackage builds installation packages from CPAN modules, containing all dependencies and an install.pl script. Running install.pl will install the module (and dependencies) without requiring Internet access or a configured CPAN client on the target machine.
To create an installer from a CPAN module, run the command:
cpackage will use cpanm to download the module and its dependencies - these files will be placed in the packages/ directory. Your currently installed version of cpanm will be copied and bundled into the bin/ directory.
Finally an install.pl file will be written - running this script will install the module together with its dependencies.
All files will be written to the current working directory.
Using your own CPAN mirror
cpackage accepts the same command-line options as cpanm, so you can use it to build an installer from your own private CPAN or DarkPAN mirror.
cpackage --mirror http://my.cpan --mirror-only My::Private::Module
If you have a DarkPAN mirror set up (e.g. using CPAN::Mini::Inject) you can create installers that contain a mix of private code and public CPAN code with full dependency resolution between the two.
Running the installer
To run the generated installer script, use the command:
perl install.pl --sudo
Jon Allen (JJ) <firstname.lastname@example.org>
Copyright 2011 Jon Allen (JJ).
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.