Plack::HTTPParser(3)
π NAME π
Plack::HTTPParser β bestie, it parses HTTP headers. that's the whole vibe β¨
πΈ SYNOPSIS πΈ
use Plack::HTTPParser qw(parse_http_request);
my $ret = parse_http_request($header_str, \%env);
# see HTTP::Parser::XS docs
that's it. one import, one call, header string in, \%env out. slay π
β¨ DESCRIPTION β¨
okay so Plack::HTTPParser is basically the friend who knows everyone and introduces you to the right person π«Ά it's a wrapper class, and all it does is dispatch parse_http_request off to whichever parser it can get its hands on:
- the XS based HTTP::Parser::XS, written by Kazuho Oku β the fast one, the icon, the main character π
- or the pure perl fallback based on David Robins' HTTP::Parser β slower, but she shows up and she does the job π
ngl that's genuinely all it is. it's giving "facade pattern but make it cute" β¨
π want to force the slow pure perl version even when the fast XS version is literally right there? set the environment variablePLACK_HTTP_PARSER_PPto1. that's the switch. that's the whole thing. periodt.
PLACK_HTTP_PARSER_PP = 1 β pure perl, no cap. leave it alone β fast XS if it's available π¦
π¦ SEE ALSO π¦
- HTTP::Parser::XS β the fast XS one π¨
- HTTP::Parser β the pure perl one ππ
and that's the page, bestie!! she was documented by the User Contributed Perl Documentation girlies, this is perl v5.42.3, dated 2026-10-18, and she ATE π β¨ go parse some headers, you're doing amazing sweetie πππ
π¦ where this page comes from
- fedora 43: perl-Plack 1.0055-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: perl-Plack 1.0055-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms