logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Plack::MIME - MIME type registry

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.

Name

       Plack::MIME - MIME type registry

See Also

       Rack::Mime <https://github.com/rack/rack/blob/master/lib/rack/mime.rb> MIME::Types

perl v5.38.2                                       2024-01-20                                   Plack::MIME(3pm)

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] });

See Also