CGI-Thin

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    `my %cgi_data = &Parse_CGI ();'

DESCRIPTION
    This module is a very lightweight parser of CGI forms. And it
    has a special feature that it will return an array if the same
    key is used twice in the form. You can force an array even if
    only one value returned to avoid complications.

    The hash %cgi_data will have all the form data from either a
    POST or GET form and will also work for "multipart/form-data"
    forms necessary for uploading files.

USAGE
      Functions

        * `CGI::Thin::Parse_CGI(@keys)'
            The optional @keys will be used to force arrays to be returned.

            The function also has special features for getting multiple values for a
            single form key.  For example if we have this form...

README  view on Meta::CPAN

    *   Added %([0-9a-fA-F]{2} to the regular expression to avoid
        illegal escapes

    *   Now split the key/value pairs by [;&] not just the ampersand

  Pending

    *   Long headers lines that have been broken over multiple lines in
        multipart/form-data don't seem to be handled.

    *   Large file uploads (like 150MB) will clobber main memory. One
        possible addition is to change how multipart/form-data is
        read and to spit files directly to the temp directory and
        return to the script a filename so it can be retreived from
        there.

    *   Any thoughts on adapting it for use withing a mod_perl
        environment?

        Under Apache::Registry, which emulates a CGI environmnet, it
        should be. Under plain ol' mod_perl, we need to interact

lib/CGI/Thin.pm  view on Meta::CPAN

C<my %cgi_data = &Parse_CGI ();>

=head1 DESCRIPTION

This module is a very lightweight parser of CGI forms.  And it has a 
special feature that it will return an array if the same key is used
twice in the form.  You can force an array even if only one value returned
to avoid complications.

The hash %cgi_data will have all the form data from either a POST or GET form
and will also work for "multipart/form-data" forms necessary for uploading files.

=head1 USAGE

  Functions

    * `CGI::Thin::Parse_CGI(@keys)'
        The optional @keys will be used to force arrays to be returned.

        The function also has special features for getting multiple values for a
        single form key.  For example if we have this form...

lib/CGI/Thin.pm  view on Meta::CPAN


=over 4

=item *

Long headers lines that have been broken over multiple lines in
multipart/form-data don't seem to be handled.

=item *

Large file uploads (like 150MB) will clobber main memory.  One possible addition is
to change how multipart/form-data is read and to spit files directly to the temp directory
and return to the script a filename so it can be retreived from there.

=item *

Any thoughts on adapting it for use withing a mod_perl environment?

Under Apache::Registry, which emulates a CGI environmnet, it should be.
Under plain ol' mod_perl, we need to interact with the
Apache::Request class a bit instead of %ENV and STDIN.



( run in 1.234 second using v1.01-cache-2.11-cpan-b16cb0d3907 )