This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Flush PL_stashcache when assigning a file handle to a typeglob.
authorNicholas Clark <nick@ccl4.org>
Sun, 23 Sep 2012 20:48:42 +0000 (22:48 +0200)
committerNicholas Clark <nick@ccl4.org>
Wed, 26 Sep 2012 21:28:50 +0000 (23:28 +0200)
commitdc93d7fb33f6b20933ff809c56ba68b8513d02c8
treec53760b75fc758da8609351c9a90ac0b729e6efc
parentb3ebc22146bca162c8b7f92453024f9f7a965c0a
Flush PL_stashcache when assigning a file handle to a typeglob.

File handles take priority over stashes for method dispatch. Assigning a
file handle to a typeglob potentially creates a file handle where one did
not exist before. As PL_stashcache only contains entries for names which
unambiguously resolve to stashes, such a change may mean that PL_stashcache
now contains an invalid entry. As it's hard to work out exactly which entries
might be affected, simply flush the entire cache and let it rebuild itself.
sv.c
t/op/method.t