pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/p5-Template-Toolkit/patches Adding a bug-fix which...
details: https://anonhg.NetBSD.org/pkgsrc/rev/043c510fd6d8
branches: trunk
changeset: 398200:043c510fd6d8
user: sno <sno%pkgsrc.org@localhost>
date: Wed Aug 26 17:39:01 2009 +0000
description:
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:
www/p5-Template-Toolkit/patches/patch-aa | 72 ++++++++++++++++++++++++++++++++
1 files changed, 72 insertions(+), 0 deletions(-)
diffs (76 lines):
diff -r c6dc28743765 -r 043c510fd6d8 www/p5-Template-Toolkit/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/p5-Template-Toolkit/patches/patch-aa Wed Aug 26 17:39:01 2009 +0000
@@ -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;
+ }
Home |
Main Index |
Thread Index |
Old Index