]> git.decadent.org.uk Git - maypole.git/commitdiff
Added patch to handle interpreter cloning, used by multithreaded MPMs. 2.11+2.111-2
authorBen Hutchings <ben@decadent.org.uk>
Sun, 16 Sep 2007 23:04:24 +0000 (23:04 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 4 Nov 2008 03:32:56 +0000 (03:32 +0000)
Without this, attributes can be lost and methods no longer recognised as exported.

debian/changelog
debian/patches/109_handle-clone.diff [new file with mode: 0644]
debian/patches/series

index 7d2c65b35bad04bd5cc3b81e3b14caff304ab567..eb71d589c0e61e4a4c366869ae22c1f09a0d217a 100644 (file)
@@ -1,3 +1,10 @@
+maypole (2.11+2.111-2) unstable; urgency=low
+
+  * Added clone handling to improve compatibility with Apache's
+    multithreaded MPMs (109_handle-clone.diff)
+
+ -- Ben Hutchings <ben@decadent.org.uk>  Sun, 16 Sep 2007 23:59:29 +0100
+
 maypole (2.11+2.111-1) unstable; urgency=low
 
   * New upstream version
diff --git a/debian/patches/109_handle-clone.diff b/debian/patches/109_handle-clone.diff
new file mode 100644 (file)
index 0000000..70258d5
--- /dev/null
@@ -0,0 +1,28 @@
+--- trunk.orig/lib/Maypole/Model/Base.pm
++++ trunk/lib/Maypole/Model/Base.pm
+@@ -12,14 +12,23 @@
+     shift; # class name not used
+     my ($coderef, @attrs) = @_;
+     
+-    $remember{$coderef} = \@attrs; 
++    $remember{$coderef} = [$coderef, \@attrs];
+     
+     # previous version took care to return an empty array, not sure why, 
+     # but shall cargo cult it until know better
+     return; 
+ }
+-sub FETCH_CODE_ATTRIBUTES { @{ $remember{$_[1]} || [] } }
++sub FETCH_CODE_ATTRIBUTES { @{ $remember{$_[1]}->[1] || [] } }
++
++sub CLONE {
++    # re-hash %remember
++    for my $key (keys %remember) {
++      my $value = delete $remember{$key};
++      $key = $value->[0];
++      $remember{$key} = $value;
++    }
++}
+ sub process {
+     my ( $class, $r ) = @_;
index a1a022dc7219e623a7eab0da159e378690f9fb08..6419a2561d3c7d6c7b3d7024e85cea29f876a3a8 100644 (file)
@@ -6,5 +6,6 @@
 106_fix-_column_info-clash.diff
 107_make-examples-consistent.diff
 108_fix-uris.diff
+109_handle-clone.diff
 201_no-file-mmagic-xs.diff
 202_fix-example-references.diff