1HTTP::Headers::ActionPaUcske:r:MCeodnitarTiybpuet(e3d)PHeTrTlP:D:oHceuamdeenrtsa:t:iAocntionPack::MediaType(3)
2
3
4
6 HTTP::Headers::ActionPack::MediaType - A Media Type
7
9 version 0.09
10
12 use HTTP::Headers::ActionPack::MediaType;
13
14 # normal constructor
15 my $mt = HTTP::Headers::ActionPack::MediaType->new(
16 'application/xml' => (
17 'q' => 0.5,
18 'charset' => 'UTF-8'
19 )
20 );
21
22 # construct from string
23 my $mt = HTTP::Headers::ActionPack::MediaType->new_from_string(
24 'application/xml; q=0.5; charset=UTF-8'
25 );
26
28 This is an object which represents an HTTP media type definition. This
29 is most often found as a member of a
30 HTTP::Headers::ActionPack::MediaTypeList object.
31
33 "type"
34 Accessor for the type.
35
36 "major"
37 The major portion of the media type name.
38
39 "minor"
40 The minor portion of the media type name.
41
42 "matches_all"
43 A media type matched all if the type is "*/*" and if it has no
44 parameters.
45
46 "equals ( $media_type | $media_type_string )"
47 This will attempt to determine if the $media_type is exactly the
48 same as itself. If given a $media_type_string it will parse it into
49 an object.
50
51 In order for two type to be equal, the types must match exactly and
52 the parameters much match exactly.
53
54 "exact_match ( $media_type | $media_type_string )"
55 This will attempt to determine if the $media_type is a match with
56 itself using the "type_matches" method below. If given a
57 $media_type_string it will parse it into an object.
58
59 In order for an exact match to occur it the types must be
60 compatible and the parameters much match exactly.
61
62 "match ( $media_type | $media_type_string )"
63 This will attempt to determine if the $media_type is a match with
64 itself using the "type_matches" method and "params_match" method
65 below. If given a $media_type_string it will parse it into an
66 object.
67
68 In order for an exact match to occur it the types must be
69 compatible and the parameters must be a subset.
70
71 "type_matches ( $media_type | $media_type_string )"
72 This will determine type compatibility, properly handling the "*"
73 types and major and minor elements of the type.
74
75 "params_match ( $parameters )"
76 This determines if the $parameters are a subset of the invocants
77 parameters.
78
80 Stevan Little <stevan.little@iinteractive.com>
81
83 • Andrew Nelson <anelson@cpan.org>
84
85 • Dave Rolsky <autarch@urth.org>
86
87 • Florian Ragwitz <rafl@debian.org>
88
89 • Jesse Luehrs <doy@tozt.net>
90
91 • Karen Etheridge <ether@cpan.org>
92
94 This software is copyright (c) 2012 by Infinity Interactive, Inc..
95
96 This is free software; you can redistribute it and/or modify it under
97 the same terms as the Perl 5 programming language system itself.
98
99
100
101perl v5.36.0 2022-0H7T-T2P2::Headers::ActionPack::MediaType(3)