NAME

slimpack - build a fatpacked, minified standalone Perl script

SYNOPSIS

slimpack [options] script
slimpack [options] -e/-E 'code' [-m/-M module ...]
slimpack trace   [--to=FILE|--to-stderr] [--use=MODULE] script
slimpack packlists-for MODULE...
slimpack tree    [PACKLIST ...]
slimpack bundle  [options] script
slimpack minify  [options] script...     # minify only, no bundling
slimpack --minify script...              # same, as a flag

DESCRIPTION

By default (pack) slimpack drives the whole fatpack pipeline internally by calling App::FatPacker's methods: it traces the boot script, drops core modules with Module::CoreList, resolves their packlists, copies the module sources into a temporary fatlib, then minifies and inlines plugins and emits a single standalone #!/usr/bin/perl script.

Each pipeline step is also exposed as its own subcommand with the same arguments as fatpack, so the individual steps can be run by hand.

minify (or the --minify switch) runs only the minification pass: each file is read, PPI-minified, and printed to STDOUT (or written with -o). Nothing is traced or bundled. The standalone minify script installed alongside slimpack offers the same mode.

OPTIONS

-o, --output FILE

Write the bundled script to FILE (default a.out; use - for stdout). minify prints to STDOUT unless -o is given.

--lib DIR

Project .pm sources (default lib).

--fatlib DIR

Fatpacked module tree (default fatlib; pack uses a temporary one).

--no-minify

Bundle modules and boot program verbatim, skipping the PPI minification pass.

--no-rename

Minify but leave variable names untouched (perl process(..., rename = 0)>). The default minifies and renames my variables. Applies to bundling and to the minify mode.

--no-inline-plugins

Keep Module::Pluggable as a runtime dependency instead of inlining plugins.

--bundle-lib-all

Include every .pm under --lib, even if not referenced. By default only statically-reachable lib modules are bundled; fatlib is always fully included.

-m MODULE

Use MODULE with no imports (like perl -m).

-M MODULE[=list]

Use MODULE, optional import list or version (like perl -M).

-e CODE

Code to bundle; may be repeated (like perl -e).

-E CODE

Same as -e, but enables all features (like perl -E).

AUTHOR

Nicolas Mendoza <mendoza@pvv.ntnu.no>

LICENSE

Artistic License 2.0.

SEE ALSO

App::FatPacker, fatpack, App::SlimPacker