HTTP::Body::Pairs
version 0.3
use HTTP::Body::Pairs; my $body = HTTP::Body->new(...); for ($body->pairs) { my ($key, $val) = @$_; # ... }
Adds functionality to HTTP::Body for retaining order information from the parsed http body.
Returns the ordered pairs as a flat list, e.g. ('foo', 'fooval', 'foo', 'fooval2', 'bar', 'barval');
Returns the ordered pairs as a list of array refs, e.g. (['foo', 'fooval'], ['foo', 'fooval2'], ['bar', 'barval']).
You don't normally need to know the order parameters came in. Usually if you need order at all, you only need to know the order for a particular param. That being the case, the extra storage overhead isn't warranted in HTTP::Body. This is for the odd case where you do need the order.
Paul Driver frodwith@cpan.org
frodwith@cpan.org
To install HTTP::Body::Pairs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Body::Pairs
CPAN shell
perl -MCPAN -e shell install HTTP::Body::Pairs
For more information on module installation, please visit the detailed CPAN module installation guide.