From d813b3413bbd58789200c2ef02c7386e33cabe00 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Sun, 16 Sep 2007 23:04:24 +0000 Subject: [PATCH] Added patch to handle interpreter cloning, used by multithreaded MPMs. Without this, attributes can be lost and methods no longer recognised as exported. --- debian/changelog | 7 +++++++ debian/patches/109_handle-clone.diff | 28 ++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 36 insertions(+) create mode 100644 debian/patches/109_handle-clone.diff diff --git a/debian/changelog b/debian/changelog index 7d2c65b..eb71d58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 index 0000000..70258d5 --- /dev/null +++ b/debian/patches/109_handle-clone.diff @@ -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 ) = @_; diff --git a/debian/patches/series b/debian/patches/series index a1a022d..6419a25 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 -- 2.39.2