• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

inc/Module/H10-Jan-2015-3,2362,427

lib/Media/Type/H10-Jan-2015-564198

share/H10-Jan-2015-397396

t/H10-Jan-2015-13384

ChangesH A D10-Jan-20152.1 KiB10159

MANIFESTH A D10-Jan-2015468 2322

MANIFEST.SKIPH A D10-Jan-2015202 2113

META.ymlH A D10-Jan-2015932 4140

Makefile.PLH A D10-Jan-2015929 5036

READMEH A D18-Jun-20142.3 KiB7352

README

1NAME
2    Media::Type::Simple - MIME Types and their file extensions
3
4REQUIREMENTS
5    The following non-core modules are required:
6
7      Exporter::Lite
8      File::Share
9      File::ShareDir
10
11SYNOPSIS
12      use Media::Type::Simple;
13
14      $type = type_from_ext("jpg");        # returns "image/jpeg"
15
16      $ext  = ext_from_type("text/plain"); # returns "txt"
17
18DESCRIPTION
19    This package gives a simple functions for obtaining common file
20    extensions from media types, and from obtaining media types from file
21    extensions.
22
23    It is also relaxed with respect to having multiple media types
24    associated with a file extension, or multiple extensions associated with
25    a media type, and it includes media types for encodings such as `gzip'.
26    It is defined this way in the default data, but this does not meet your
27    needs, then you can have it use a system file (e.g. /etc/mime.types) or
28    custom data.
29
30    By default, there is a functional interface, although you can also use
31    an object-oriented interface. (Different objects will not share the same
32    data.)
33
34REVISION HISTORY
35    For a detailed history see the Changes file included in this
36    distribution.
37
38SEE ALSO
39    The MIME::Types module has a similar functionality, but with a more
40    complex interface.
41
42    LWP::MediaTypes will guess the media type from a file extension,
43    attempting to use the ~/.media.types file.
44
45    An "official" list of Media Types can be found at
46    http://www.iana.org/assignments/media-types.
47
48AUTHOR
49    Robert Rothenberg <rrwo at cpan.org>
50
51  Contributors
52    Martin McGrath
53
54  Acknowledgements
55    Some of the code comes from self module (by Kang-min Liu). The data for
56    the media types is based on the Debian `mime-support' package,
57    http://packages.debian.org/mime-support, although with *many* changes
58    from the original.
59
60  Suggestions and Bug Reporting
61    Feedback is always welcome. Please use the CPAN Request Tracker at
62    http://rt.cpan.org to submit bug reports.
63
64    The git repository for this module is at
65    https://github.com/robrwo/Media-Types-Simple.
66
67COPYRIGHT & LICENSE
68    Copyright 2009-2014 Robert Rothenberg, all rights reserved.
69
70    This program is free software; you can redistribute it and/or modify it
71    under the same terms as Perl itself.
72
73