Add an extra file into the package. If the file is a directory, recursively
add all files inside that directory, with links turned into actual files.
By default, files are placed under / inside the package with their original names. You may override this by appending the target filename after a ;, like this:
You may specify -a multiple times.
Read a list of file/directory names from FILE, adding them into the
package. Each line in FILE is taken as an argument to <B>-aB> above.
You may specify -A multiple times.
|<B>-BB>, <B>--bundleB>||Bundle core modules in the resulting package. This option is enabled by default, except when -p or -P is specified.|
|<B>-CB>, <B>--cleanB>||Clean up temporary files extracted from the application at runtime. By default, these files are cached in the temporary directory; this allows the program to start up faster next time.|
|<B>-cB>, <B>--compileB>||Run perl -c inputfile to determine additonal run-time dependencies.|
|<B>-cdB>, <B>--cachedepsB>=FILE||Use FILE to cache detected dependencies. Creates FILE unless present. This will speed up the scanning process on subsequent runs.|
|<B>-dB>, <B>--dependentB>||Reduce the executable size by not including a copy of perl interpreter. Executables built this way will need a separate perl5x.dll or libperl.so to function correctly. This option is only available if perl is built as a shared library.|
|<B>-eB>, <B>--evalB>=STRING||Package a one-liner, much the same as perl -e ...|
|<B>-EB>, <B>--evalfeatureB>=STRING||Behaves just like -e, except that it implicitly enables all optional features (in the main compilation unit) with Perl 5.10 and later. See feature.|
|<B>-xB>, <B>--executeB>||Run perl inputfile to determine additonal run-time dependencies.|
|<B>--xargsB>=STRING||If <B>-xB> is given, splits the STRING using the function shellwords from Text::ParseWords and passes the result as @ARGV when running perl inputfile.|
|<B>-XB>, <B>--excludeB>=MODULE||Exclude the given module from the dependency search path and from the package. If the given file is a zip or par or par executable, all the files in the given file (except MANIFEST, META.yml and script/*) will be excluded and the output file will use the given file at runtime.|
Filter source script(s) with a PAR::Filter subclass. You may specify
multiple such filters.
If you wish to hide the source code from casual prying, this will do:
|<B>-gB>, <B>--guiB>||Build an executable that does not have a console window. This option is ignored on non-MSWin32 platforms or when -p is specified.|
|<B>-hB>, <B>--helpB>||Show basic usage information.|
|<B>-IB>, <B>--libB>=DIR||Add the given directory to the perl library file search path. May be specified multiple times.|
|<B>-lB>, <B>--linkB>=FILE|LIBRARY||Add the given shared library (a.k.a. shared object or DLL) into the packed file. Also accepts names under library paths; i.e. -l ncurses means the same thing as -l libncurses.so or -l /usr/local/lib/libncurses.so in most Unixes. May be specified multiple times.|
|<B>-LB>, <B>--logB>=FILE||Log the output of packaging to a file rather than to stdout.|
Filter included perl module(s) with a PAR::Filter subclass.
You may specify multiple such filters.
By default, the PodStrip filter is applied. In case that causes trouble, you can turn this off by setting the environment variable PAR_VERBATIM to 1.
Since PAR 0.958, you can use an optional regular expression (REGEX above) to select the files in the archive which should be filtered. Example:
Add the specified module into the package, along with its dependencies.
If MODULE has a trailing double colon, e.g. Foo::Bar::, add not only Foo/Bar.pm, but also all modules below Foo/Bar.
If MODULE has an extension that is not .pm/.ix/.al, it will not be scanned for dependencies, and will be placed under / instead of /lib/ inside the PAR file. This use is <B>deprecatedB> consider using the <B>-aB> option instead.
You may specify -M multiple times.
|<B>-mB>, <B>--multiarchB>||Build a multi-architecture PAR file. Implies <B>-pB>.|
|<B>-nB>, <B>--noscanB>||Skip the default static scanning altogether, using run-time dependencies from <B>-cB> or <B>-xB> exclusively.|
|<B>-oB>, <B>--outputB>=FILE||File name for the final packaged executable.|
|<B>-pB>, <B>--parB>||Create PAR archives only; do not package to a standalone binary.|
|<B>-PB>, <B>--perlscriptB>||Create stand-alone perl script; do not package to a standalone binary.|
|<B>-rB>, <B>--runB>||Run the resulting packaged script after packaging it.|
The second line will run otherapp.pl instead of someapp.pl.
|<B>-SB>, <B>--saveB>||Do not delete generated PAR file after packaging.|
|<B>-sB>, <B>--signB>||Cryptographically sign the generated PAR or binary file using Module::Signature.|
Set the program unique part of the cache directory name that is used
if the program is run without -C. If not set, a hash of the executable
When the program is run, its contents are extracted to a temporary directory. On Unix systems, this is commonly /tmp/par-USER/cache-XXXXXXX. USER is replaced by the name of the user running the program, but spelled in hex. XXXXXXX is either a hash of the executable or the value passed to the -T or --tempcache switch.
Package Unicode support (essentially utf8_heavy.pl and everything
below the directory unicore in your perl library).
This option exists because it is impossible to detect using static analysis if your program needs Unicode support at runtime. (Note: If your program contains use utf8 this does <B>notB> imply it needs Unicode support. It merely says that your program is written in UTF-8.)
If your packed program exits with an error message like
try to pack it with -u (or use -x).
|<B>-vB>, <B>--verboseB>[=NUMBER]||Increase verbosity of output; NUMBER is an integer from 1 to 3, 3 being the most verbose. Defaults to 1 if specified without an argument. Alternatively, <B>-vvB> sets verbose level to 2, and <B>-vvvB> sets it to 3.|
|<B>-VB>, <B>--versionB>||Display the version number and copyrights of this program.|
|<B>-zB>, <B>--compressB>=NUMBER||Set zip compression level; NUMBER is an integer from 0 to 9, 0 = no compression, 9 = max compression. Defaults to 6 if <B>-zB> is not used.|
PP_OPTS Command-line options (switches). Switches in this variable are taken as if they were on every pp command line.
Here are some recipes showing how to utilize pp to bundle source.pl with all its dependencies, on target machines with different expected settings:
Note that even if your perl was built with a shared library, the Stand-alone executable above will not need a separate perl5x.dll or libperl.so to function correctly. But even in this case, the underlying system libraries such as libc must be compatible between the host and target machines. Use --dependent if you are willing to ship the shared library with the application, which can significantly reduce the executable size.
Stone-alone setup: To make a stand-alone executable, suitable for running on a machine that doesnt have perl installed:
% pp -o packed.exe source.pl # makes packed.exe # Now, deploy packed.exe to target machine... $ packed.exe # run it
Perl interpreter only, without core modules: To make a packed .pl file including core modules, suitable for running on a machine that has a perl interpreter, but where you want to be sure of the versions of the core modules that your program uses:
% pp -B -P -o packed.pl source.pl # makes packed.pl # Now, deploy packed.pl to target machine... $ perl packed.pl # run it
Perl with core modules installed: To make a packed .pl file without core modules, relying on the target machines perl interpreter and its core libraries. This produces a significantly smaller file than the previous version:
% pp -P -o packed.pl source.pl # makes packed.pl # Now, deploy packed.pl to target machine... $ perl packed.pl # run it
Perl with PAR.pm and its dependencies installed: Make a separate archive and executable that uses the archive. This relies upon the perl interpreter and libraries on the target machine.
% pp -p source.pl # makes source.par % echo "use PAR source.par;" > packed.pl; % cat source.pl >> packed.pl; # makes packed.pl # Now, deploy source.par and packed.pl to target machine... $ perl packed.pl # run it, perl + core modules required
Simon Cozens, Tom Christiansen and Edward Peschko for writing perlcc; this program try to mimic its interface as close as possible, and copied liberally from their code.
Jan Dubois for writing the exetype.pl utility, which has been partially adapted into the -g flag.
Mattia Barbon for providing the myldr binary loader code.
Jeff Goff for suggesting the name pp.
Audrey Tang <firstname.lastname@example.org>, Steffen Mueller <email@example.com>
Please submit bug reports to <firstname.lastname@example.org>.
Copyright 2002-2009 by Audrey Tang <email@example.com>.
Neither this program nor the associated parl program impose any licensing restrictions on files generated by their execution, in accordance with the 8th article of the Artistic License:
"Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Packages interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package."
Therefore, you are absolutely free to place any license on the resulting executable, as long as the packed 3rd-party libraries are also available under the Artistic License.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|perl v5.20.3||PP (3)||2016-01-17|