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

Web::AssetLib::InputEngine::RemoteFile - allows importing an asset via a URL

SYNOPSIS

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 );

USAGE

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.

SEE ALSO

Web::AssetLib::InputEngine

Web::AssetLib::InputEngine::LocalFile

Web::AssetLib::InputEngine::Content

AUTHOR

Ryan Lang <rlang@cpan.org>