);
}
else if(mro_changes) mro_method_changed_in(GvSTASH(dstr));
+ if (GvIO(dstr) && dtype == SVt_PVGV) {
+ DEBUG_o(Perl_deb(aTHX_
+ "glob_assign_glob clearing PL_stashcache\n"));
+ /* It's a cache. It will rebuild itself quite happily.
+ It's a lot of effort to work out exactly which key (or keys)
+ might be invalidated by the creation of the this file handle.
+ */
+ hv_clear(PL_stashcache);
+ }
return;
}
use strict;
no warnings 'once';
-plan(tests => 141);
+plan(tests => 142);
@A::ISA = 'B';
@B::ISA = 'C';
is(Colour::H1->getline(), <DATA>, 'read from a file');
is(Color::H1->getline(), <DATA>,
- 'file handles take priority after typeglob assignment');
+ 'file handles take priority after io-to-typeglob assignment');
*Color::H1 = *CLOSED{IO};
{
is(Color::H1->getline(), 'method in Color::H1',
'undefining the typeglob does change object resolution');
+ *Color::H1 = *Colour::H1;
+
+ is(Color::H1->getline(), <DATA>,
+ 'file handles take priority after typeglob-to-typeglob assignment');
+
seek Colour::H1, $fh_start, Fcntl::SEEK_SET() or die $!;
seek DATA, $data_start, Fcntl::SEEK_SET() or die $!;