Paul Driver > HTTP-Body-Pairs > HTTP::Body::Pairs

Download:
HTTP-Body-Pairs-0.3.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.3   Source  

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

syntax highlighting: