Tatsuhiko Miyagawa > Plack-1.0031 > Plack::MIME

Download:
Plack-1.0031.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source   Latest Release: Plack-1.0033

NAME ^

Plack::MIME - MIME type registry

SYNOPSIS ^

  use Plack::MIME;

  my $mime = Plack::MIME->mime_type(".png"); # image/png

  # register new type(s)
  Plack::MIME->add_type(".foo" => "application/x-foo");

  # Use MIME::Types as a fallback
  use MIME::Types 'by_suffix';
  Plack::MIME->set_fallback(sub { (by_suffix $_[0])[0] });

DESCRIPTION ^

Plack::MIME is a simple MIME type registry for Plack applications. The selection of MIME types is based on Rack's Rack::Mime module.

SEE ALSO ^

Rack::Mime MIME::Types

syntax highlighting: