Resource::Pack::FromFile - easily use external resource description files
# 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;
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;
This is a subclass of Resource::Pack::Resource, which handles loading a resource definition from a separate file.
The file to read the resource definition from. The containing directory is used as the default for
Please see those modules/websites for more information related to this module.
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.