App::Packer::Backend - backend interface for App::Packer
There is no module named App::Packer::Backend; this is just an abstract interface all modules wishing to work as backends to App::Packer must conform to.
Backend objects take as input a list of files to be stored inside an executable, and write the executable.
All methods return a false value on failure, unless otherwise specified.
Available methods.
my $backend = App::Packer::Backend->new();
Creates a new Backend instance. It must be possible to call the constructor without any parameter.
$backend->set_files( @data );
Sets the files that are to be stored in the packed executable; each call to this method discards any previous information. File information is of the form: type => value where value is either a reference to file_info or a reference to an array of file_info.
Each file_info has this structure:
{ file => full_path_to_file, store_as => path_inside_the_app used_by => [ file_info1, file_info2, ... ], ... }
Valid file types are currently
main - the main script file; its value is a reference to a single file_info.
modules - modules used by the script
autload - autoload files
data - arbitrary files
shared - dynamic libraries, such as DLL/so files
$backend->write( 'file.exe' );
Write the executable file. This method should not change the provided file name in any way.
$backend->set_options( name => value, ... );
Set backend-dependent options; this is a list of name => value pairs (if the value is not interesting, it should be 0); standard options are:
name => value
verbose => numeric value
Be verbose; the numeric value indicates verbosity level (0 = quiet).
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.