NAME
Resource::Pack::Resource - a collection of resources
VERSION
version 0.03
SYNOPSIS
my $resource = Resource::Pack::Resource->new(
name => 'test',
install_from => data_dir,
);
$resource->add_file(
name => 'test1',
file => 'test.txt'
);
$resource->add_dir(
name => 'test2',
);
$resource->add_url(
name => 'jquery',
url => 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js',
);
$resource->install;
DESCRIPTION
This class is a collection of other resources. It can contain Resource::Pack::File, Resource::Pack::Dir, Resource::Pack::URL, and other Resource::Pack::Resource objects. It is a subclass of Bread::Board::Container, and consumes the Resource::Pack::Installable role.
ATTRIBUTES
install_from_dir
Base dir, where the contents will be located. Defaults to the install_from_dir
of the parent resource. The associated constructor argument is install_from
.
METHODS
install
The install method for this class installs all of the resources that it contains, except for other Resource::Pack::Resource resources. To also install contained Resource::Pack::Resource resources, use the install_all
method.
install_all
This method installs all contained resources, including other Resource::Pack::Resource resources.
add_file
Creates a Resource::Pack::File resource inside this resource, passing any arguments along to the constructor.
add_dir
Creates a Resource::Pack::Dir resource inside this resource, passing any arguments along to the constructor.
add_url
Creates a Resource::Pack::URL resource inside this resource, passing any arguments along to the constructor.
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.