HTTP::...iaType(3pm)
π NAME π
HTTP::Headers::ActionPack::MediaType β bestie, it's a Media Type. That's it, that's the whole vibe. β¨
πΈ VERSION πΈ
version 0.09
π SYNOPSIS π
okay so here's how you actually use this thing:
use HTTP::Headers::ActionPack::MediaType;
# normal constructor
my $mt = HTTP::Headers::ActionPack::MediaType->new(
'application/xml' => (
'q' => 0.5,
'charset' => 'UTF-8'
)
);
# construct from string
my $mt = HTTP::Headers::ActionPack::MediaType->new_from_string(
'application/xml; q=0.5; charset=UTF-8'
);
π¦ DESCRIPTION π¦
So this is an object that represents an HTTP media type definition, no cap. And where do you usually find one of these little guys? Most often as a member of an HTTP::Headers::ActionPack::MediaTypeList object. it's giving "part of a bigger ensemble," and honestly? obsessed. π
π METHODS π
π type
Accessor for the type. that's the whole thing. it just gives you the type. β¨
π major
The major portion of the media type name.
π minor
The minor portion of the media type name.
π matches_all
A media type matched all if the type is "*/*" and if it has no parameters. both conditions, bestie, no shortcuts. π
π equals ( $media_type | $media_type_string )
This will attempt to determine if the $media_type is exactly the same as itself. If you hand it a $media_type_string it will parse it into an object.
In order for two type to be equal, the types must match exactly and the parameters much match exactly. (yes, exactly. precision queen behavior. π)
π exact_match ( $media_type | $media_type_string )
This will attempt to determine if the $media_type is a match with itself using the "type_matches" method below. If you give it a $media_type_string it will parse it into an object.
In order for an exact match to occur it the types must be compatible and the parameters much match exactly.
π match ( $media_type | $media_type_string )
This will attempt to determine if the $media_type is a match with itself using the "type_matches" method and "params_match" method below. If you give it a $media_type_string it will parse it into an object.
In order for an exact match to occur it the types must be compatible and the parameters must be a subset. π«Ά
π type_matches ( $media_type | $media_type_string )
This will determine type compatibility, properly handling the "*" types and major and minor elements of the type. it ate that, fr fr.
π params_match ( $parameters )
This determines if the $parameters are a subset of the invocants parameters. subset energy only, not a full match, okay? β¨
π AUTHOR π
Stevan Little <stevan.little@iinteractive.com>
π CONTRIBUTORS π
- Andrew Nelson
<anelson@cpan.org> - Dave Rolsky
<autarch@urth.org> - Florian Ragwitz
<rafl@debian.org> - Jesse Luehrs
<doy@tozt.net> - Karen Etheridge
<ether@cpan.org>
β COPYRIGHT AND LICENSE β
This software is copyright (c) 2012 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie!! π this wasperl v5.34.0, dated2022-06-14, and yes it's literally theHTTP::...iaType(3pm)page you just read. slay. no cap. periodt. π β¨
π¦ where this page comes from
- debian bookworm: libhttp-headers-actionpack-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhttp-headers-actionpack-perl 0.09-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms