develooper Front page | perl.perl5.porters | Postings from December 2001

B::walksymtable oddness

Thread Next
From:
Mattia Barbon
Date:
December 26, 2001 07:12
Subject:
B::walksymtable oddness
Message ID:
3C29F71A.11778.E9ECC8@localhost
Hello,
I'm currently working on B::C, and I fond that this perl snippet:

../perl -MB=walksymtable -e 'sub x {};*foo = *bar = \&x;sub B::GV::foo {print $_[0]-
>NAME,"\n" }walksymtable(\%main::,'foo',sub{})'

prints 'bar' twice and does not print 'foo';
the reason is that B::walksymtable calls
$glob_obj->EGV->$method, instead of $glob_obj->$method. Does anyone know why it does 
call the method on ->EGV ?
I think this should be changed because the user module can check
the EGV if it needs to, but with the current implementation does not allow the user 
module to inspect aliased globs ( without rewriting
walksymtable ). 

Regards
Mattia

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About