NAME
pp_autolink - Run the pp (PAR Packager) utility while automatically finding dynamic libs to link
SYNOPSIS
pp_autolink --link some_dll pp_opts [ scriptfile ]
EXAMPLES
Note: As with pp, when running on Microsoft Windows, the a.out below will be replaced by a.exe instead.
# Pack 'hello.pl' into executable 'a.out'
% pp_autolink hello.pl
# Pack 'hello.pl' into executable 'hello'
# (or 'hello.exe' on Win32)
% pp_autolink -o hello hello.pl
# pack hello.pl and its dependent dynamic libs,
# as well as some.dylib and other.dylib,
# and their dependent dynamic libs
% pp_autolink --link some.dylib --link other.dylib -o hello hello.pl
# Args other than --link are passed on to the pp call
# e.g., extra modules in the include path
# (these are not currently checked by pp_autolink)
% pp_autolink -M Foo::Bar hello
# pp_autolink also supports the @file syntax for args
# Pack 'hello.pl' but read _additional_
# options from file 'file'
% pp_autolink @file hello.pl
DESCRIPTION
pp creates standalone executables from Perl programs. However, it does not pack dynamic libs by default, and a general source of angst is that dynamic libs have dependencies that must be traced and also packed for the packed executable to be usable on a "clean" system.
pp_autolink is an attempt to automate this packing process.
All pp_autolink does is recursively check all dynamic libs used by a perl script and add them to the pp call using --link
command line arguments.
Depending on your system it will use the ldd, objdump or otool utilities to find dependent libs.
It will also check dynamic libs used by Aliens if they are detected and inherit from Alien::Base.
Note that testing is currently very threadbare, so please report issues. Pull requests are very welcome.
OPTIONS
As with pp, options are available in a short form and a long form. For example, these lines are equivalent:
% pp_autolink -l some.dll output.exe input.pl
% pp_autolink --link some.dll --output output.exe input.pl
All other options are passed on to the pp call. See the pp for full details.
ENVIRONMENT
- PP_OPTS
-
The PP_OPTS environment variable, used by pp, is ignored. Since all pp_autolink does is wrangle dynamic libs and then add them to a pp call, it will still be used for the final executable.
SEE ALSO
pp, PAR, PAR::Packer, Module::ScanDeps
Getopt::Long, Getopt::ArgvFile
ACKNOWLEDGMENTS
The initial version of pp_autolink was adapted from the pp_simple utility.
AUTHORS
Shawn Laffan <shawnlaffan@gmail.com>,
Please submit bug reports to https://github.com/shawnlaffan/perl-pp-autolink/issues.
COPYRIGHT
Copyright 2017-2020 by Shawn Laffan <shawnlaffan@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE.