1Email::MIME::ContentTypUes(e3r)Contributed Perl DocumentEamtaiioln::MIME::ContentType(3)
2
3
4

NAME

6       Email::MIME::ContentType - Parse a MIME Content-Type Header
7

VERSION

9       version 1.013
10

SYNOPSIS

12         use Email::MIME::ContentType;
13
14         # Content-Type: text/plain; charset="us-ascii"; format=flowed
15         my $ct = 'text/plain; charset="us-ascii"; format=flowed';
16         my $data = parse_content_type($ct);
17
18         $data = {
19           discrete   => "text",
20           composite  => "plain",
21           attributes => {
22             charset => "us-ascii",
23             format  => "flowed"
24           }
25         };
26

FUNCTIONS

28   parse_content_type
29       This routine is exported by default.
30
31       This routine parses email content type headers according to section 5.1
32       of RFC 2045. It returns a hash as above, with entries for the discrete
33       type, the composite type, and a hash of attributes.
34

WARNINGS

36       This is not a valid content-type header, according to both RFC 1521 and
37       RFC 2045:
38
39         Content-Type: type/subtype;
40
41       If a semicolon appears, a parameter must.  "parse_content_type" will
42       carp if it encounters a header of this type, but you can suppress this
43       by setting $Email::MIME::ContentType::STRICT_PARAMS to a false value.
44       Please consider localizing this assignment!
45

PERL EMAIL PROJECT

47       This module is maintained by the Perl Email Project.
48
49       <http://emailproject.perl.org/wiki/Email::MIME::ContentType>
50

AUTHOR

52       Casey West, "casey@geeknest.com" Simon Cozens, "simon@cpan.org"
53

SEE ALSO

55       Email::MIME
56
57
58
59perl v5.12.0                      2009-01-24       Email::MIME::ContentType(3)
Impressum