From 06051fb3a4c13da4cdeee8dcbf18e71e55199fed Mon Sep 17 00:00:00 2001 From: sno Date: Wed, 26 Aug 2009 17:39:01 +0000 Subject: Adding a bug-fix which supresses same function is installed multiple times. See http://rt.cpan.org/Ticket/Display.html?id=48989 for details. --- www/p5-Template-Toolkit/patches/patch-aa | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 www/p5-Template-Toolkit/patches/patch-aa (limited to 'www/p5-Template-Toolkit') 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; + } -- cgit v1.2.3