App::Packer - pack applications in a single executable file
App::Packer packs perl scripts and all of their dependencies inside an executable.
All methods return a false value on failure, unless otherwise specified.
my $packer = App::Packer->new( frontend => class, backend => class );
Creates a new App::Packer instance, using the given classes as frontend and backend.
App::Packer
'frontend' defaults to App::Packer::Frontend::ModuleInfo, 'backend' to App::Packer::Backend::DemoPack. You need to use My::Module; if you pass My::Module as frontend or backend, unless you use the default value.
App::Packer::Frontend::ModuleInfo
App::Packer::Backend::DemoPack
use My::Module;
My::Module
Currently known frontends are App::Packer::Frontend::ModuleInfo (default, distributed with App::Packer), and Module::ScanDeps.
Module::ScanDeps
Currently known backends are App::Packer::Backend::DemoPack (default, distributed with App::Packer), and App::Packer::Backend::PAR.
App::Packer::Backend::PAR
$packer->set_file( 'path/to/file' );
Sets the file name of the script to be packed.
my $file = $packer->write( 'my_executable' );
Writes the executable file; the file name is just the basename of the file: $Config{_exe} will be appended, and the file will be made executable (via chmod 0755).
The return value is the file name that was actually created.
$packer->set_options( frontend => { option1 => value1, ... }, backend => { option9 => value9, ... }, );
Sets the options for frontend and backend; see the documentation for App::Packer::Frontend and App::Packer::Backend for details.
App::Packer::Frontend
App::Packer::Backend
App::Packer::Frontend, App::Packer::Backend.
Mattia Barbon <mbarbon@dsi.unive.it>
To install App::Packer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Packer
CPAN shell
perl -MCPAN -e shell install App::Packer
For more information on module installation, please visit the detailed CPAN module installation guide.