On Tue, 2005-03-15 at 23:21 -0500, Perrin Harkins wrote: 
> On Wed, 2005-03-16 at 08:47 +0530, Joshua N Pritikin wrote:
> > CGI::Simple doesn't work with mod_perl 1.999.20:
> > 
> >  $data = $self->{'.mod_perl'} ? Apache->request->args :
> >           $ENV{'QUERY_STRING'} || $ENV{'REDIRECT_QUERY_STRING'} || '';
> > 
> > Apache->request->args returns an Apache::RequestRec instead of a native
> > perl data structure.
> 
> Really?  It should still give you the query string.
> 
> http://perl.apache.org/docs/2.0/api/Apache/RequestRec.html#C_args_

Oh!  And it does.  The problem is elsewhere.

I'm trying to get parameters from multipart/form-data.  Here is what the
CGI::Simple object looks like:

$VAR1 = bless( { 
                 '.parameters' => [
                                    'Apache::RequestRec'
                                  ],
                 '.crlf' => '
',
                 '.mod_perl' => 2,
                 '.globals' => {
                                 'DEBUG' => 0,
                                 'NO_UNDEF_PARAMS' => 0,
                                 'NO_NULL' => 1,
                                 'FATAL' => -1,
                                 'USE_PARAM_SEMICOLONS' => 1,
                                 'DISABLE_UPLOADS' => 1,
                                 'USE_CGI_PM_DEFAULTS' => 0,
                                 'NPH' => 0,
                                 'POST_MAX' => 8192,
                                 'HEADERS_ONCE' => 0
                               },
                 'Apache::RequestRec' => [
                                           'SCALAR(0x877fedc)'
                                         ],
                 '.fieldnames' => {
                                    'Apache::RequestRec' => 1
                                  },
                 '.cookies' => {
                                 'OHL_ID' => bless( {
                                                      'value' => [
                                                                   '25'
                                                                 ],
                                                      'name' => 'OHL_ID',
                                                      'path' => '/'
                                                    }, 'CGI::Simple::Cookie' )
                               },
                 '.header_printed' => 1
               }, 'CGI::Simple' );

Somehow the Apache::RequestRec is not being unpacked.  There isn't any special
casing for mod_perl in this code path so maybe a special case needs to be added?

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to