You should use libapreq2, which is a library that globally allows to deal
with data submitted by the client.

You can find documentation about it here:

Concerning CGI.pm, except if you are already using it for other purposes, I
would advise you not to load and use it, and use libapreq2 instead which is
(far) lighter and more efficient.

Re large data uploads efficiency, I'm not able to reply right now, but I'm
sure others in this list could provide a reply.


----- Original Message -----
From: "Erik Norgaard"
Sent: Thursday, September 28, 2006 10:03 AM
Subject: Getting post data

> Hi:
> I am using Apache 2.2 with mod_perl2. Reading the documentation I have
> found that I should get POST data using read():
> $r->read($buffer, $r->headers_in('content-length'))
> A few questions - ok, some may really be related to the http protocol:
> 1) Is the headers_in case sensitive? (content-length ne Content-Length)?
> 2) Once in, any tricks or modules for parsing the data?
> 3) How about file-uploads, are these binary or base64?
> 4) How do I efficiently handle large posts (such as file uploads)?
> I know I could bang my head against the keyboard and eventually get some
> working code out, but it seems that these are quite general issues, so
> some solution must exist.
> Other question: modperlbook.org is down, is there a mirror or place I can
> download it?
> Thanks, Erik
> --
> Ph: +34.666334818 web: http://www.locolomo.org
> X.509 Certificate: http://www.locolomo.org/crt/8D03551FFCE04F0C.crt
> Key ID: 69:79:B8:2C:E3:8F:E7:BE:5D:C3:C3:B1:74:62:B8:3F:9F :1F:69:B9