in the stash they were created in. Steal the idea from
IO::File to just delete the stash entry after creating
the GV.
This fixes perl #59268.
p4raw-id: //depot/perl@34779
package PerlIO::via;
-our $VERSION = '0.06';
+our $VERSION = '0.07';
use XSLoader ();
XSLoader::load 'PerlIO::via';
1;
GvIOp(gv) = newIO();
s->fh = newRV((SV *) gv);
s->io = GvIOp(gv);
+ if (gv) {
+ /* shamelessly stolen from IO::File's new_tmpfile() */
+ hv_delete(GvSTASH(gv), GvNAME(gv), GvNAMELEN(gv), G_DISCARD);
+ }
}
IoIFP(s->io) = PerlIONext(f);
IoOFP(s->io) = PerlIONext(f);