Man Page: mojolicious::types
Operating Environment: debian
Section: 3pm
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)
| Similar Topics in the Unix Linux Community |
|---|
| Adding the individual columns of a matrix. |
| Is UNIX an open source OS ? |
| Weird 'find' results |
| A (ksh) Library For and From UNIX.com |
| New UNIX and Linux History Sections |