Query: mojolicious::types
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Mojolicious::Types(3pm) User Contributed Perl Documentation Mojolicious::Types(3pm)NAMEMojolicious::Types - MIME typesSYNOPSISuse Mojolicious::Types; my $types = Mojolicious::Types->new;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 $ext = $types->detect('application/json;q=9'); Detect file extensions from "Accept" header value. Unspecific values that contain more than one MIME type are currently ignored, since browsers often don't really know what they actually want. "type" my $type = $types->type('png'); $types = $types->type(png => 'image/png'); $types = $types->type(json => [qw(application/json text/x-json)]); Get or set MIME types for file extension, alternatives are only used for detection.SEE ALSOMojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojolicious::Types(3pm)