Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 12352
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: LDS [...] cpan.org
Requestors: max_verem [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: CGI.pm feat. mod_perl 2.0.0-RC5
Download (untitled) / with headers
text/plain 1.9k
I found some problem in use CGI.pm (version 3.07) with mod_perl (version 2.0.0-RC5). Patch i provide is not compleetly tested but make able to start some application used CGI.pm under newest mod_perl. --- CGI.pm.origin 2005-04-20 16:56:48.268120432 +0300 +++ CGI.pm 2005-04-20 18:49:19.889594233 +0300 @@ -183,9 +183,9 @@ if (defined $mod_perl::VERSION) { if ($mod_perl::VERSION >= 1.99) { $MOD_PERL = 2; - require Apache::Response; - require Apache::RequestRec; - require Apache::RequestUtil; +# require Apache::Response; +# require Apache2::RequestRec; +# require Apache::RequestUtil; require APR::Pool; } else { $MOD_PERL = 1; @@ -330,7 +330,7 @@ if (ref($initializer[0]) && (UNIVERSAL::isa($initializer[0],'Apache') || - UNIVERSAL::isa($initializer[0],'Apache::RequestRec') + UNIVERSAL::isa($initializer[0],'Apache2::RequestRec') )) { $self->r(shift @initializer); } @@ -338,20 +338,20 @@ && (UNIVERSAL::isa($initializer[0],'CODE'))) { $self->upload_hook(shift @initializer, shift @initializer); } - if ($MOD_PERL) { + if ($MOD_PERL==1) + { $self->r(Apache->request) unless $self->r; my $r = $self->r; - if ($MOD_PERL == 1) { - $r->register_cleanup(\&CGI::_reset_globals); - } - else { - # XXX: once we have the new API - # will do a real PerlOptions -SetupEnv check - $r->subprocess_env unless exists $ENV{REQUEST_METHOD}; - $r->pool->cleanup_register(\&CGI::_reset_globals); - } - undef $NPH; + $r->register_cleanup(\&CGI::_reset_globals); + } + elsif ($MOD_PERL == 2) + { + $self->r(Apache2::RequestUtil->request()) unless $self->r; + my $r = $self->r; + $r->subprocess_env unless exists $ENV{REQUEST_METHOD}; + $r->pool->cleanup_register(\&CGI::_reset_globals); } + undef $NPH if ($MOD_PERL); $self->_reset_globals if $PERLEX; $self->init(@initializer); return $self;
Download (untitled) / with headers
text/plain 128b
mod_perl 2.0.0-RC5 is compatible only with CGI.pm version 3.08 or higher, as clearly stated in the mod_perl documentation.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.