HTTP::...harset(3pm)
π HTTP::Headers::ActionPack::AcceptCharset π
okay bestie, welcome to the User Contributed Perl Documentation page for HTTP::Headers::ActionPack::AcceptCharset β yes that's a whole mouthful, and yes you're gonna slay it. this is the HTTP::...harset(3pm) page and we're getting into it π
β¨ NAME β¨
HTTP::Headers::ActionPack::AcceptCharset β a Priority List, but make it customized for Media Types π
πΈ VERSION πΈ
version 0.09 β she's giving vintage, she's giving stable, she's giving 0.09 periodt
π¦ SYNOPSIS π¦
look at her go, no cap:
use HTTP::Headers::ActionPack::AcceptCharset;
# normal constructor
my $list = HTTP::Headers::ActionPack::AcceptCharset->new(
[ 1.0 => 'UTF-8' ],
[ 0.7 => 'ISO-8859-1' ],
);
# or from a string
my $list = HTTP::Headers::ActionPack::AcceptCharsetList->new_from_string(
'UTF-8; q=1.0, ISO-8859-1; q=0.7'
);
two whole ways to build your list and both of them are iconic, honestly π«Ά
π DESCRIPTION π
so basically: this class is a subclass of HTTP::Headers::ActionPack::PriorityList, and it inherits everything from its parent, but then it adds some charset-specific features on top. it's giving "main character energy but she knows where she came from" β¨
π METHODS π
π new_from_string
this method overrides the default constructor, because it has to do some extra logic that RFC-2616 requires. lowkey the tea here is:
if an Accept-Charset header doesn't explicitly define the priority for "*" or "ISO-8859-1", then the default priority for "ISO-8859-1" must be set to 1.0. like, it's not optional, it's the rules, it's the law, it's the vibe check that RFC passed π
ngl, the docs also flag this important bit: we do not override the new method. so if you're passing an explicit list of values straight to the constructor, we assume you know what you're doing. you're the main character, we trust you π«Ά
π§ canonicalize_choice
this one takes a string containing a character set name and hands you back the canonical MIME name for that charset. for example: it transforms utf8 into UTF-8. glow-up of the century, honestly πβ¨
π AUTHOR π
Stevan Little <stevan.little@iinteractive.com> β the icon, the legend, the author π
β CONTRIBUTORS β
these absolute legends also showed up and helped, and we love that for them:
- 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>
group project done RIGHT, no cap π
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2012 by Infinity Interactive, Inc..
and it's free software babes: you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so go wild, respectfully πΈ
and that's the whole page, bestie! this was HTTP::...harset(3pm) from perl v5.34.0, dated 2022-06-14 β shoutout to the version and the date for holding it down, and shoutout to YOU for reading the whole thing ππ¦β¨
π¦ 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