perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Moseley <mose...@hank.org>
Subject Re: PerlSetupEnv and CGI.pm
Date Fri, 04 Jun 2004 23:11:31 GMT
On Fri, Jun 04, 2004 at 03:05:36PM -0400, Perrin Harkins wrote:
> On Fri, 2004-06-04 at 14:49, Bill Moseley wrote:
> > With PerlSetupEnv OFF $cgi->param('foo') returns undef.  I'm sure this
> > is suppose to work
> 
> "Scripts using the CGI.pm module require PerlSetupEnv On because that
> module relies on a properly populated CGI environment table."

I read right past that!  I thought I'd used it before without problems
and a quick look at CGI.pm showed:

      if ($meth=~/^(GET|HEAD)$/) {
          if ($MOD_PERL) {
            $query_string = $self->r->args;

so I expected it would work to get the args.

> It doesn't use it very much, but it does use it.  If you wanted to, you
> could probably change a few lines in CGI.pm and get it to work without
> %ENV populated.

It's for an example script that can be run as a mod_perl handler or as a CGI
script, so it's handy to use CGI.pm.  I'll just note that PerlSetupEnv
must be on in the docs.




> 
> - Perrin
> 
> 

-- 
Bill Moseley
moseley@hank.org


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Mime
View raw message