Mojolicious::Types(3) User Contributed Perl DocumentationMojolicious::Types(3)NAMEMojolicious::Types - MIME Types
SYNOPSIS
use Mojolicious::Types;
DESCRIPTIONMojolicious::Types is a container for MIME types.
ATTRIBUTESMojolicious::Types implements the following attributes.
"types"
my $map = $types->types;
$types = $types->types({png => 'image/png'});
List of MIME types.
METHODSMojolicious::Types inherits all methods from Mojo::Base and implements
the following ones.
"detect"
my $extensions = $types->detect('application/json;q=9');
Detect file extensions from "Accept" header value. Note that this
method is EXPERIMENTAL and might change without warning!
"type"
my $type = $types->type('png');
$types = $types->type(png => 'image/png');
Get or set MIME type for file extension.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.1 2011-09-01 Mojolicious::Types(3)