summaryrefslogtreecommitdiff
path: root/www/p5-Template-Toolkit
diff options
context:
space:
mode:
authorsno <sno@pkgsrc.org>2009-08-26 17:39:01 +0000
committersno <sno@pkgsrc.org>2009-08-26 17:39:01 +0000
commit06051fb3a4c13da4cdeee8dcbf18e71e55199fed (patch)
tree648dfd255388c75bf1944d2b4b014af82e21039e /www/p5-Template-Toolkit
parentc92c78c3fe2d8c3b6a677060291144975c1b1b37 (diff)
downloadpkgsrc-06051fb3a4c13da4cdeee8dcbf18e71e55199fed.tar.gz
Adding a bug-fix which supresses same function is installed multiple times.
See http://rt.cpan.org/Ticket/Display.html?id=48989 for details.
Diffstat (limited to 'www/p5-Template-Toolkit')
-rw-r--r--www/p5-Template-Toolkit/patches/patch-aa72
1 files changed, 72 insertions, 0 deletions
diff --git a/www/p5-Template-Toolkit/patches/patch-aa b/www/p5-Template-Toolkit/patches/patch-aa
new file mode 100644
index 00000000000..31ffb2b043b
--- /dev/null
+++ b/www/p5-Template-Toolkit/patches/patch-aa
@@ -0,0 +1,72 @@
+$NetBSD: patch-aa,v 1.5 2009/08/26 17:39:01 sno Exp $
+
+# Fixes RT #48989
+
+--- lib/Template/Plugin/Procedural.pm.orig 2009-08-25 11:19:17.219629000 +0200
++++ lib/Template/Plugin/Procedural.pm 2009-08-25 11:21:08.970766000 +0200
+@@ -39,34 +39,40 @@
+ # okay, in our proxy create the autoload routine that will
+ # call the right method in the real class
+ no strict "refs";
+- *{ $proxy . "::AUTOLOAD" } = sub {
+- # work out what the method is called
+- $AUTOLOAD =~ s!^.*::!!;
+-
+- print STDERR "Calling '$AUTOLOAD' in '$class'\n"
+- if $DEBUG;
+-
+- # look up the sub for that method (but in a OO way)
+- my $uboat = $class->can($AUTOLOAD);
+-
+- # if it existed call it as a subroutine, not as a method
+- if ($uboat) {
+- shift @_;
+- return $uboat->(@_);
+- }
+-
+- print STDERR "Eeek, no such method '$AUTOLOAD'\n"
+- if $DEBUG;
+-
+- return "";
+- };
++ unless( defined( *{ $proxy . "::AUTOLOAD" } ) )
++ {
++ *{ $proxy . "::AUTOLOAD" } = sub {
++ # work out what the method is called
++ $AUTOLOAD =~ s!^.*::!!;
++
++ print STDERR "Calling '$AUTOLOAD' in '$class'\n"
++ if $DEBUG;
++
++ # look up the sub for that method (but in a OO way)
++ my $uboat = $class->can($AUTOLOAD);
++
++ # if it existed call it as a subroutine, not as a method
++ if ($uboat) {
++ shift @_;
++ return $uboat->(@_);
++ }
++
++ print STDERR "Eeek, no such method '$AUTOLOAD'\n"
++ if $DEBUG;
++
++ return "";
++ };
++ }
+
+ # create a simple new method that simply returns a blessed
+ # scalar as the object.
+- *{ $proxy . "::new" } = sub {
+- my $this;
+- return bless \$this, $_[0];
+- };
++ unless( defined( *{ $proxy . "::new" } ) )
++ {
++ *{ $proxy . "::new" } = sub {
++ my $this;
++ return bless \$this, $_[0];
++ };
++ }
+
+ return $proxy;
+ }