Create a new MIME::Types
object which manages the data. In the current
implementation, it does not matter whether you create this object often
within your program, but in the future this may change.
Option | Default |
---|---|
only_complete | <false> |
Add one or more TYPEs to the set of known types. Each TYPE is a
Please inform the maintainer of this module when registered types
are missing. Before version MIME::Types version 1.14, a warning
was produced when an unknown IANA type was added. This has been
removed, because some people need that to get their application
to work locally... broken applications...MIME::Type
which must be experimental: either the main-type or
the sub-type must start with C
Returns a list of all defined extensions.
Returns the MIME::Type
object which belongs to the FILENAME (or simply
its filename extension) or undef
if the file type is unknown. The extension
is used, and considered case-insensitive.
In some cases, more than one type is known for a certain filename extension. In that case, one of the alternatives is chosen at random.
my MIME::Types $types = MIME::Types->new; my MIME::Type $mime = $types->mimeTypeOf('gif'); my MIME::Type $mime = $types->mimeTypeOf('jpg'); print $mime->isBinary;
Return the MIME::Type
which describes the type related to STRING. One
type may be described more than once. Different extensions is use for
this type, and different operating systems may cause more than one
MIME::Type
object to be defined. In scalar context, only the first
is returned.
Returns a list of all defined mime-types