Footprintless::ResourceManager - A manager for finding and retrieving resources
version 1.28
use Footprintless; my $footprintless = Footprintless->new(); my $resource_manager = footprintless->resource_manager(); # Find a resource my $resource = $resource_manager->resource('/foo/bar'); # Download it my $file = $resource->download(); # Download a maven resource (without resolving first) my $file = $resource_manager->download('com.pastdev:foo:1.0.0'); # Download a resource to a specific location $resource_manager->download( 'http://pastdev.com/resources/baz', to => '/foo/baz');
Manages finding and retrieving resources.
Constructs a Footprintless::ResourceManager that will locate resources using the supplied providers. Each provider will by queried, in order, with a call to supports($spec). The first to respond with a truthy value will be used.
Footprintless::ResourceManager
Downloads $resource, and returns the path that it was downloaded to. The supported options are:
$resource
The path to download to. If the path points to an existing directory, then the resource will be downloaded into that directory and maintain its name part from the URL. Otherwise, the path will be used for the file.
Returns the Footprintless::Resource indicated by $spec.
$spec
Lucas Theisen <lucastheisen@pastdev.com>
This software is copyright (c) 2016 by Lucas Theisen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Please see those modules/websites for more information related to this module.
Footprintless
Footprintless::Resource
Footprintless::Resource::Provider
To install Footprintless, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Footprintless
CPAN shell
perl -MCPAN -e shell install Footprintless
For more information on module installation, please visit the detailed CPAN module installation guide.