On Fri, 4 Feb 2000, Aaron Ross wrote:
> Hi!
> I'm trying to write an AccessHandler. I'm using CGI::Cookie to, you got it,
> create and parse Cookies. However, I'm getting an error that I don't totally
> understand. ( This is mod_perl related... just hold on. )
>
> If i call
> CGI::Cookie->parse($r->headers_in->get('Cookie'));
> I will get this error:
> Can't call method "register_cleanup" on an undefined value at
>/usr/lib/perl5/5.00503/CGI.pm line 262.
>
> Now that is on this line in the CGI.pm constructor:
>
> if ($MOD_PERL) {
> ---> Apache->request->register_cleanup(\&CGI::_reset_globals);
> undef $NPH;
> }
>
> Why does that fail? I'm running under mod_perl.. I mean this is failing when
> it is called from a PerlAccessHandler!
The solution is to add to I<httpd.conf>:
PerlPostReadRequestHandler 'sub { Apache->request(shift) }'
_______________________________________________________________________
Stas Bekman mailto:[EMAIL PROTECTED] http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.org modperl.sourcegarden.org perlmonth.com perl.org
single o-> + single o-+ = singlesheaven http://www.singlesheaven.com