The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Resource::Pack::FromFile - easily use external resource description files

VERSION

version 0.03

SYNOPSIS

    # in data/resources
    url jquery => 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js';
    file app_js => 'app.js';
    file app_css => (
        file       => 'app.css',
        install_to => 'css',
    );
    dir 'images';

    # in installer script
    my $resource = Resource::Pack::FromFile->new(
        name          => 'my_app',
        resource_file => 'data/resources',
        install_to    => 'app',
    );
    $resource->install;

or

    package My::App::Resources;
    use Moose;
    extends 'Resource::Pack::FromFile';

    has '+name'          => (default => 'my_app');
    has '+resource_file' => (default => 'data/resources');

    my $resource = My::App::Resources->new(install_to => 'app');
    $resource->install;

DESCRIPTION

This is a subclass of Resource::Pack::Resource, which handles loading a resource definition from a separate file.

ATTRIBUTES

resource_file

The file to read the resource definition from. The containing directory is used as the default for install_from.

1;

SEE ALSO

Please see those modules/websites for more information related to this module.

AUTHORS

  • Stevan Little <stevan.little@iinteractive.com>

  • Jesse Luehrs <doy at tozt dot net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.