This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make B::walksymtable not recurse into packages that are actually main::, but have...
authorFlorian Ragwitz <rafl@debian.org>
Thu, 13 Nov 2008 21:34:12 +0000 (22:34 +0100)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 16 Nov 2008 18:02:49 +0000 (18:02 +0000)
Message-Id: <1226608453-25937-1-git-send-email-rafl@debian.org>

p4raw-id: //depot/perl@34845

ext/B/B.pm

index 05ffcb2..52ae05e 100644 (file)
@@ -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 "<none>::" && &$recurse($sym)) {
+           if (svref_2object(\*$sym)->NAME ne "main::" && $sym ne "<none>::" && &$recurse($sym)) {
                walksymtable(\%$fullname, $method, $recurse, $sym);
            }
        } else {