This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
B::walksymtable: clear cached methods
authorFather Chrysostomos <sprout@cpan.org>
Mon, 23 Oct 2017 16:50:10 +0000 (09:50 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 23 Oct 2017 16:52:02 +0000 (09:52 -0700)
commitf4a37198b80677735d8243e3538253bb7082c86e
tree4627007fc218f1d70226470ee7bc2a682d16633b
parent6c2ae6421675ba5ff81dd43f9167136f02dfe9d9
B::walksymtable: clear cached methods

There was a dummy assignment in B::walksymtable that I removed in com-
mit 6a4fc5265ba1 because it appeared to be redundant.  Removing that
assignment broke Module::Info (rt.cpan.org #123352), because it
changed the behaviour of B::Utils (by changing the behaviour of
B::walksymtable).  That seemingly useless assignment was actually
clearing cached methods, so that any B::GV object passed to the call-
back method sees ->CV pointing to something only if there is a real
sub there.  Since this seems like a reasonable expectation, this com-
mit restores the old behaviour, with a comment explaining what the
assignment is for, and tests it.
ext/B/B.pm
ext/B/t/b.t