From: Mattia Barbon Date: Thu, 27 Dec 2001 19:14:24 +0000 (+0100) Subject: Re: B::walksymtable oddness X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b6b0fb7be3d9ce67dd4e2839b02c40c428fbea0e;p=p5sagit%2Fp5-mst-13.2.git Re: B::walksymtable oddness Message-ID: <3C2B7310.861.18820D0@localhost> p4raw-id: //depot/perl@13914 --- diff --git a/ext/B/B.pm b/ext/B/B.pm index 06f99c4..90d3ff5 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -211,18 +211,18 @@ sub walksymtable { my ($symref, $method, $recurse, $prefix) = @_; my $sym; my $ref; - no strict 'vars'; - local(*glob); + my $fullname; + no strict 'refs'; $prefix = '' unless defined $prefix; while (($sym, $ref) = each %$symref) { - *glob = "*main::".$prefix.$sym; + $fullname = "*main::".$prefix.$sym; if ($sym =~ /::$/) { $sym = $prefix . $sym; if ($sym ne "main::" && $sym ne "::" && &$recurse($sym)) { - walksymtable(\%glob, $method, $recurse, $sym); + walksymtable(\%$fullname, $method, $recurse, $sym); } } else { - svref_2object(\*glob)->EGV->$method(); + svref_2object(\*$fullname)->$method(); } } }