fixed typo and doc bug on command usage
[p5sagit/App-FatPacker.git] / bin / fatpack
CommitLineData
a5e340ba 1#!/usr/bin/env perl
2
3use App::FatPacker -run_script;
4
5=head1 NAME
6
7fatpack - Command line frontend for App::FatPacker
8
9=head1 COMMANDS
10
11=head2 trace
12
13 $ fatpack trace [--to=trace-file|--to-stderr] myscript.pl
14
15Compiles myscript.pl (as in "perl -c") and writes out a trace file containing
16every module require()d during the compilation.
17
18The trace file is called 'fatpacker.trace' by default; the --to option
19overrides this.
20
21If you pass --to-stderr fatpack writes the trace to STDERR instead.
22
23You cannot pass both --to and --to-stderr.
24
25=head2 packlists-for
26
27 $ fatpack packlists-for Module1 Module2 Module3
28
29Searches your perl's @INC for .packlist files containing the .pm files for
30the modules requested and emits a list of unique packlist files to STDOUT.
31
32These packlists will, in a pure cpan-installation environment, be all non-core
33distributions required for those modules.
34
35Unfortunately most vendors strip the .packlist files so if you installed
36modules via e.g. apt-get you may be missing those modules; installing your
37dependencies into a L<local::lib|local::lib> first is the preferred workaround.
38
39=head2 tree
40
41 $ fatpack tree fatlib packlist1 packlist2 packlist3
42
43Takes a list of packlist files and copies their contents into a tree at the
44requested location.
45
46This tree should be sufficient to 'use lib' to make available all modules
47provided by the distributions whose packlists were specified.
48
49=head2 file
50
51 $ fatpack file
52
53Recurses into the 'lib' and 'fatlib' directories and bundles all .pm files
54found into a BEGIN block which adds a virtual @INC entry to load these files
55from the bundled code rather than disk.
56
57=head1 RECIPES
58
59Current basic recipe for packing:
60
61 $ fatpack trace myscript.pl
a884f0d7 62 $ fatpack packlists-for `cat fatpacker.trace` >packlists
63 $ fatpack tree `cat packlists`
a5e340ba 64 $ (fatpack file; cat myscript.pl) >myscript.packed.pl
65
66=head1 COPYRIGHT, LICENSE, AUTHOR
67
68See the corresponding sections in L<App::FatPacker>.
69
70=cut