Web::AssetLib::InputEngine::RemoteFile - allows importing an asset via a URL
my $library = My::AssetLib::Library->new( input_engines => [ Web::AssetLib::InputEngine::RemoteFile->new() ] ); my $asset = Web::AssetLib::Asset->new( type => 'javascript', input_engine => 'RemoteFile', input_args => { url => "http://somecdn.com/asset.js", } ); $library->compile( asset => $asset );
No configuration required. Simply instantiate, and include in your library's list of input engines.
Assets using the RemoteFile input engine must provide url input arg.
url
Web::AssetLib::InputEngine
Web::AssetLib::InputEngine::LocalFile
Web::AssetLib::InputEngine::Content
Ryan Lang <rlang@cpan.org>
To install Web::AssetLib, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Web::AssetLib
CPAN shell
perl -MCPAN -e shell install Web::AssetLib
For more information on module installation, please visit the detailed CPAN module installation guide.