Web::AssetLib::Util - core utilties for Web::AssetLib
my $type = normalizeFileType( 'stylesheet' ); # $type = 'css'
Converts file type string to a normalized version of that string. e.g. "javascript" maps to "js"
my $mime = normalizeMimeType( 'stylesheet' ); # $mime = 'text/css'
Converts file type string to a mime type. e.g. "javascript" maps to "text/javascript"
my $output = ... # a Web::AssetLib::Output object my $tag = generateHtmlTag( output => $output, html_attrs => { async => 'async' } );
Generates an HTML tag for a Web::AssetLib::Output object. Optionally, html_attrs can be provided.
html_attrs
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.