Package: libapache-session-wrapper-perl
Version: 0.19-1
Severity: important
Tags: patch

I was able to make it work under mod_perl2+mason. However I had to make
an adjustment in the code:

In _get_session_id_from_cookie you have

    my %c = $self->{cookie_class}->fetch;

however, as you find in the pod of Apache2::Apache::Cookie:

CHANGES to the v1 API:
       * "Apache::Cookie::fetch" requires an $r object as (second)
       * argument.

It is simply resolved this way:

    my %c = $self->{cookie_class}->fetch( @{ $self->{new_cookie_args} }

This won't broke the cgi, since then new_cookie_args is empty.
You may say that using new_cookie_args is not appropriate, although
I think the semantics of that variable qualifies it for using both at
'sub new' and at 'sub fetch' --- only the name prefix new_ is not
appropriate I guess...

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-amd-nfs
Locale: LANG=hu_HU, LC_CTYPE=hu_HU (charmap=ISO-8859-2)

Versions of packages libapache-session-wrapper-perl depends on:
ii  libapache-session-perl        1.60-2     Perl modules for keeping persisten
ii  libclass-container-perl       0.11-0.1   Glues object frameworks together t
ii  libexception-class-perl       1.20-1     a module that allows you to declar
ii  libparams-validate-perl       0.76-1     validate parameters to Perl method
ii  perl                          5.8.4-6    Larry Wall's Practical Extraction 

-- no debconf information
--- Wrapper.pm.orig     2005-03-03 21:16:39.000000000 +0100
+++ Wrapper.pm  2005-03-03 21:22:31.000000000 +0100
@@ -522,7 +522,7 @@
 {
     my $self = shift;
 
-    my %c = $self->{cookie_class}->fetch;
+    my %c = $self->{cookie_class}->fetch( @{ $self->{new_cookie_args} } );
 
     return $c{ $self->{cookie_name} }->value
         if exists $c{ $self->{cookie_name} };

Reply via email to