NAME
makepar.pl - Make Perl Archives
SYNOPSIS
Checking module dependencies for /home/test.pl:
% makepar.pl /home/test.pl
To turn /home/test.pl into a self-contained foo.pl that runs anywhere with a matching version of core perl (5.6 or above):
% makepar.pl -S -B -O./foo.par /home/test.pl
% par.pl -b -O./foo.pl foo.par # or -B to bundle core modules
% perl foo.pl # runs anywhere with core modules
Same thing, but making a self-contained binary executable foo.exe instead, by bundling the perl executable itself:
% makepar.pl -B -O./foo.par /home/test.pl
% perlcc -o par.exe par.pl # only need to do this once
% par.exe -B -O./foo.exe foo.par # self-contained .exe
% foo.exe # runs anywhere with same OS
# (but see TODO for caveats)
DESCRIPTION
This module makes a zip-compressed Perl Archive (PAR) file from a perl script or module, by putting all included library files into the archive's lib/
directory, and optionally store the script themselves into the script/
directory.
To generate ./foo.par from the script /home/test.pl, do this:
% makepar.pl -O./foo.par /home/test.pl
% makepar.pl -O./foo /home/test.pl # the .par part is optional
Same thing, but include /home/test.pl in the PAR as script/test.pl:
% makepar.pl -b -O./foo.par /home/test.pl
% makepar.pl -b -O./foo /home/test.pl # ditto
Same thing, but include /home/test.pl in the PAR as script/main.pl:
% makepar.pl -B -O./foo.par /home/test.pl # turns first .pl into main.pl
You can specify additional include directories with -I and -M;
% makepar.pl -MTest::More -I/tmp -O./foo.par /home/test.pl
The -S switch will cause this program to ignore all core modules, while the -s switch just ignores pure-perl core modules:
% makepar.pl -s -O./foo.par /home/test.pl # just skip $Config{privlib}
% makepar.pl -S -O./foo.par /home/test.pl # skips privlib and archlib
Note that all module-scanning heuristics are in Module::ScanDeps, distributed separately on CPAN. This script is just a wrapper around that module and Archive::Zip.
SEE ALSO
AUTHORS
Autrijus Tang <autrijus@autrijus.org>
Based on the perl2exe-scan.pl by Indy Singh <indy@indigostar.com>
COPYRIGHT
Copyright 2002 by Autrijus Tang <autrijus@autrijus.org>. Copyright 1998, 2002 by IndigoSTAR Software http://www.indigostar.com/.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.