From 082b74eb74586857de13c8c1c1d19f6f3a2da06e Mon Sep 17 00:00:00 2001 From: Florian Ragwitz Date: Wed, 8 Apr 2009 03:37:43 +0200 Subject: Upgrade to NEXT-0.62. --- lib/NEXT.pm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'lib/NEXT.pm') diff --git a/lib/NEXT.pm b/lib/NEXT.pm index dc3127763b..053ee1097d 100644 --- a/lib/NEXT.pm +++ b/lib/NEXT.pm @@ -1,5 +1,5 @@ package NEXT; -$VERSION = '0.61'; +$VERSION = '0.62'; use Carp; use strict; use overload (); @@ -61,11 +61,19 @@ sub NEXT::ELSEWHERE::buildAUTOLOAD last if shift @forebears eq $caller_class } no strict 'refs'; - @{$NEXT::NEXT{$key,$wanted_method}} = - map { *{"${_}::$caller_method"}{CODE}||() } @forebears + @{$NEXT::NEXT{$key,$wanted_method}} = + map { + my $stash = \%{"${_}::"}; + ($stash->{$caller_method} && (*{$stash->{$caller_method}}{CODE})) + ? *{$stash->{$caller_method}}{CODE} + : () } @forebears unless $wanted_method eq 'AUTOLOAD'; - @{$NEXT::NEXT{$key,$wanted_method}} = - map { (*{"${_}::AUTOLOAD"}{CODE}) ? "${_}::AUTOLOAD" : ()} @forebears + @{$NEXT::NEXT{$key,$wanted_method}} = + map { + my $stash = \%{"${_}::"}; + ($stash->{AUTOLOAD} && (*{$stash->{AUTOLOAD}}{CODE})) + ? "${_}::AUTOLOAD" + : () } @forebears unless @{$NEXT::NEXT{$key,$wanted_method}||[]}; $NEXT::SEEN->{$key,*{$caller}{CODE}}++; } -- cgit v1.2.1