.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "HTTP::Headers::ActionPack::MediaType 3pm" .TH HTTP::Headers::ActionPack::MediaType 3pm "2021-01-07" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" HTTP::Headers::ActionPack::MediaType \- A Media Type .SH "VERSION" .IX Header "VERSION" version 0.09 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use HTTP::Headers::ActionPack::MediaType; \& \& # normal constructor \& my $mt = HTTP::Headers::ActionPack::MediaType\->new( \& \*(Aqapplication/xml\*(Aq => ( \& \*(Aqq\*(Aq => 0.5, \& \*(Aqcharset\*(Aq => \*(AqUTF\-8\*(Aq \& ) \& ); \& \& # construct from string \& my $mt = HTTP::Headers::ActionPack::MediaType\->new_from_string( \& \*(Aqapplication/xml; q=0.5; charset=UTF\-8\*(Aq \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is an object which represents an \s-1HTTP\s0 media type definition. This is most often found as a member of a HTTP::Headers::ActionPack::MediaTypeList object. .SH "METHODS" .IX Header "METHODS" .ie n .IP """type""" 4 .el .IP "\f(CWtype\fR" 4 .IX Item "type" Accessor for the type. .ie n .IP """major""" 4 .el .IP "\f(CWmajor\fR" 4 .IX Item "major" The major portion of the media type name. .ie n .IP """minor""" 4 .el .IP "\f(CWminor\fR" 4 .IX Item "minor" The minor portion of the media type name. .ie n .IP """matches_all""" 4 .el .IP "\f(CWmatches_all\fR" 4 .IX Item "matches_all" A media type matched all if the type is \f(CW\*(C`*/*\*(C'\fR and if it has no parameters. .ie n .IP """equals ( $media_type | $media_type_string )""" 4 .el .IP "\f(CWequals ( $media_type | $media_type_string )\fR" 4 .IX Item "equals ( $media_type | $media_type_string )" This will attempt to determine if the \f(CW$media_type\fR is exactly the same as itself. If given a \f(CW$media_type_string\fR it will parse it into an object. .Sp In order for two type to be equal, the types must match exactly and the parameters much match exactly. .ie n .IP """exact_match ( $media_type | $media_type_string )""" 4 .el .IP "\f(CWexact_match ( $media_type | $media_type_string )\fR" 4 .IX Item "exact_match ( $media_type | $media_type_string )" This will attempt to determine if the \f(CW$media_type\fR is a match with itself using the \f(CW\*(C`type_matches\*(C'\fR method below. If given a \f(CW$media_type_string\fR it will parse it into an object. .Sp In order for an exact match to occur it the types must be compatible and the parameters much match exactly. .ie n .IP """match ( $media_type | $media_type_string )""" 4 .el .IP "\f(CWmatch ( $media_type | $media_type_string )\fR" 4 .IX Item "match ( $media_type | $media_type_string )" This will attempt to determine if the \f(CW$media_type\fR is a match with itself using the \f(CW\*(C`type_matches\*(C'\fR method and \&\f(CW\*(C`params_match\*(C'\fR method below. If given a \f(CW$media_type_string\fR it will parse it into an object. .Sp In order for an exact match to occur it the types must be compatible and the parameters must be a subset. .ie n .IP """type_matches ( $media_type | $media_type_string )""" 4 .el .IP "\f(CWtype_matches ( $media_type | $media_type_string )\fR" 4 .IX Item "type_matches ( $media_type | $media_type_string )" This will determine type compatibility, properly handling the \f(CW\*(C`*\*(C'\fR types and major and minor elements of the type. .ie n .IP """params_match ( $parameters )""" 4 .el .IP "\f(CWparams_match ( $parameters )\fR" 4 .IX Item "params_match ( $parameters )" This determines if the \f(CW$parameters\fR are a subset of the invocants parameters. .SH "AUTHOR" .IX Header "AUTHOR" Stevan Little .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" .IP "\(bu" 4 Andrew Nelson .IP "\(bu" 4 Dave Rolsky .IP "\(bu" 4 Florian Ragwitz .IP "\(bu" 4 Jesse Luehrs .IP "\(bu" 4 Karen Etheridge .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2012 by Infinity Interactive, Inc.. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.