Package: libhtml-mason-perl
Version: 1:1.36-2.1
Severity: normal
Tags: patch

If you subclass the Mason Request object and attempt to use the
"alter_superclass" method, as described in the documentation
http://www.masonhq.com/docs/manual/Subclassing.html#what_to_subclass
Mason will segfault.  Apparantly the way it manipulates @INC rubs 5.10
the wrong way.  Patch from Jesse Vincent
http://marc.info/?l=mason-devel&m=121236173002678&w=2


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.25-2-vserver-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages libhtml-mason-perl depends on:
ii  libcache-cache-perl          1.05-2      Managed caches of persistent infor
ii  libclass-container-perl      0.12-2      Glues object frameworks together t
ii  libexception-class-perl      1.24-1      a module that allows you to declar
ii  libhtml-parser-perl          3.56-1+b1   A collection of modules that parse
ii  libparams-validate-perl      0.91-2      validate parameters to Perl method
ii  perl                         5.10.0-11.1 Larry Wall's Practical Extraction 
ii  perl-base [libscalar-list-ut 5.10.0-11.1 The Pathologically Eclectic Rubbis

Versions of packages libhtml-mason-perl recommends:
ii  libapache2-mod-perl2          2.0.4-1    Integration of perl with the Apach

-- no debconf information
Index: libhtml-mason-perl-1.36/lib/HTML/Mason/Request.pm
===================================================================
--- libhtml-mason-perl-1.36.orig/lib/HTML/Mason/Request.pm	2007-06-10 10:52:58.000000000 -0700
+++ libhtml-mason-perl-1.36/lib/HTML/Mason/Request.pm	2008-07-19 11:15:55.000000000 -0700
@@ -350,7 +350,8 @@
     my $isa_ref;
     {
         no strict 'refs';
-        $isa_ref = [EMAIL PROTECTED]"$class\::ISA"};
+        my @entries = @{$class."::ISA"};
+        $isa_ref = [EMAIL PROTECTED];
     }
 
     # handles multiple inheritance properly and preserve
@@ -364,13 +365,16 @@
             if ( $old_super ne $new_super )
             {
                 $isa_ref->[$x] = $new_super;
-
-                $class->valid_params( %{ $class->valid_params } );
             }
-
             last;
         }
     }
+
+    {
+        no strict 'refs';
+        @{$class."::ISA"} = @$isa_ref;
+    }
+    $class->valid_params( %{ $class->valid_params } );
 }
 
 sub exec {

Reply via email to