From: Florian Ragwitz Date: Thu, 13 Nov 2008 21:34:12 +0000 (+0100) Subject: Make B::walksymtable not recurse into packages that are actually main::, but have... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7834d9fbabb6939951d14409a25b6dc04d3bd15d;p=p5sagit%2Fp5-mst-13.2.git Make B::walksymtable not recurse into packages that are actually main::, but have a different name. Message-Id: <1226608453-25937-1-git-send-email-rafl@debian.org> p4raw-id: //depot/perl@34845 --- diff --git a/ext/B/B.pm b/ext/B/B.pm index 05ffcb2..52ae05e 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -7,7 +7,7 @@ # package B; -our $VERSION = '1.21'; +our $VERSION = '1.22'; use XSLoader (); require Exporter; @@ -240,7 +240,7 @@ sub walksymtable { $fullname = "*main::".$prefix.$sym; if ($sym =~ /::$/) { $sym = $prefix . $sym; - if ($sym ne "main::" && $sym ne "::" && &$recurse($sym)) { + if (svref_2object(\*$sym)->NAME ne "main::" && $sym ne "::" && &$recurse($sym)) { walksymtable(\%$fullname, $method, $recurse, $sym); } } else {