The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

HTTP::Body::Pairs

VERSION

version 0.3

SYNOPSIS

    use HTTP::Body::Pairs;

    my $body = HTTP::Body->new(...);
    for ($body->pairs) {
        my ($key, $val) = @$_;
        # ... 
    }

DESCRIPTION

Adds functionality to HTTP::Body for retaining order information from the parsed http body.

METHODS

flat_pairs

Returns the ordered pairs as a flat list, e.g. ('foo', 'fooval', 'foo', 'fooval2', 'bar', 'barval');

pairs

Returns the ordered pairs as a list of array refs, e.g. (['foo', 'fooval'], ['foo', 'fooval2'], ['bar', 'barval']).

RATIONALE

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.

AUTHOR

Paul Driver frodwith@cpan.org