Skip Menu |

This queue is for tickets about the Apache-Session CPAN distribution.

Report information
The Basics
Id: 14504
Status: open
Priority: 0/
Queue: Apache-Session

People
Owner: Nobody in particular
Requestors: cgrau [...] cpan.org
Cc:
AdminCc:

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



Subject: Patch for Session/Generate/ModUsertrack.pm to work with MP2.
The file Session/Generate/ModUsertrack.pm in Apache-Session-1.6 uses the 1.x way of using the Apache module. The attached (untested, but should work) patch allows it to work with mod_perl 1.x and mod_perl 2.0.x. The patch is against version 1.6, but the file is no different in the 1.70_01 version.
- make Session::Generate::ModUsertrack work with MP2. --- ./Session/Generate/ModUsertrack.pm 2001-10-11 10:43:32.000000000 -0700 +++ ./Session/Generate/ModUsertrack.pm.mp2 2005-09-07 16:01:11.798128185 -0700 @@ -15,8 +15,14 @@ if (!exists $cookies{$name} && MOD_PERL) { # no cookies, try to steal from notes - require Apache; - my $r = Apache->request; + my $r; + if ( $ENV{MOD_PERL_API_VERION} == 2 ) { + require Apache2::RequestUtil; + $r = Apache2::RequestUtil->request; + } else { + require Apache; + $r = Apache->request; + } %cookies = CGI::Cookie->parse($r->notes('cookie')); }
On Sep 07 19:25:14 2005, guest wrote: Show quoted text
> The file Session/Generate/ModUsertrack.pm in Apache-Session-1.6 uses > the 1.x way of using the Apache module. The attached (untested, > but should work) patch allows it to work with mod_perl 1.x and > mod_perl 2.0.x.
See warning about Apache2::RequestUtil::request() at http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache_E_gt_request_ Can you make also a documentation patch? -- Alexandr Ciornii, http://chorny.net