The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Packer::Frontend - frontend interface for App::Packer

DESCRIPTION

There is no module named App::Packer::Frontend; this is just an abstract interface all modules wishing to work as frontends for App::Packer must conform to.

Frontend objects take as input the path to a file, and determine all the files (modules, autoload files, dynamic link libraraies...) the script depends upon.

RETURN VALUES

All methods return a false value on failure, unless otherwise specified.

METHODS

new

  my $frontend = App::Packer::Frontend->new();

Creates a new frontend instance. It must be possible to call the constructor without any parameter.

set_file

  $frontend->set_file( 'file_name' );

Sets the file whose dependencies are to be computed.

calculate_info

  $frontend->calculate_info();

Computes the dependent files.

get_files

  my $data = $frontend->get_files();

Returns the dependencies; the format is the same as the input to App::Packer::Backend::set_files.

It is necessary to call calculate_info in order for this method to return any useful value.

set_options

  $frontend->set_options( name => value, ... );

Set frontend-dependent options; this is a list of name => value pairs (if the value is not interesting, it should be 0); standard options are:

  • verbose => numeric value

    Be verbose; the numeric value indicates verbosity level (0 = quiet).

  • add_modules => array reference

    Add the listed modules (and their requisites) to the list of modules to be included in the executable.