3 use App::FatPacker -run_script;
7 fatpack - Command line frontend for App::FatPacker
13 $ fatpack pack myscript.pl > myscript.packed.pl
15 A shortcut to do all the work of tracing, collecting packlists,
16 extracting modules in fatlib, then concatenating into a packed script
17 - in one shot. If you need more detailed controls for additional
18 modules, use the following commands separately (see L</RECIPES>).
22 $ fatpack trace [--to=trace-file|--to-stderr] [--use=MODULE]
25 Compiles myscript.pl (as in "perl -c") and writes out a trace file containing
26 every module require()d during the compilation.
28 The trace file is called 'fatpacker.trace' by default; the --to option
31 If you pass --to-stderr fatpack writes the trace to STDERR instead.
33 You cannot pass both --to and --to-stderr.
35 If the --use option specifies a module (or modules, if used multiple
36 times) those modules will be additionally included in the trace output.
40 $ fatpack packlists-for Module1 Module2 Module3
42 Searches your perl's @INC for .packlist files containing the .pm files for
43 the modules requested and emits a list of unique packlist files to STDOUT.
45 These packlists will, in a pure cpan-installation environment, be all non-core
46 distributions required for those modules.
48 Unfortunately most vendors strip the .packlist files so if you installed
49 modules via e.g. apt-get you may be missing those modules; installing your
50 dependencies into a L<local::lib|local::lib> first is the preferred workaround.
54 $ fatpack tree fatlib packlist1 packlist2 packlist3
56 Takes a list of packlist files and copies their contents into a tree at the
59 This tree should be sufficient to 'use lib' to make available all modules
60 provided by the distributions whose packlists were specified.
66 Recurses into the 'lib' and 'fatlib' directories and bundles all .pm files
67 found into a BEGIN block which adds a virtual @INC entry to load these files
68 from the bundled code rather than disk.
72 Current basic recipe for packing:
74 $ fatpack trace myscript.pl
75 $ fatpack packlists-for `cat fatpacker.trace` >packlists
76 $ fatpack tree `cat packlists`
77 $ fatpack file myscript.pl >myscript.packed.pl
79 =head1 COPYRIGHT, LICENSE, AUTHOR
81 See the corresponding sections in L<App::FatPacker>.