Change 34779 by [EMAIL PROTECTED] on 2008/11/08 18:31:09
Make sure PerlIO::via doesn't leave its old GV's hanging
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.
Affected files ...
... //depot/perl/ext/PerlIO/via/via.pm#11 edit
... //depot/perl/ext/PerlIO/via/via.xs#18 edit
Differences ...
==== //depot/perl/ext/PerlIO/via/via.pm#11 (text) ====
Index: perl/ext/PerlIO/via/via.pm
--- perl/ext/PerlIO/via/via.pm#10~34026~ 2008-06-08 07:03:58.000000000
-0700
+++ perl/ext/PerlIO/via/via.pm 2008-11-08 10:31:09.000000000 -0800
@@ -1,5 +1,5 @@
package PerlIO::via;
-our $VERSION = '0.06';
+our $VERSION = '0.07';
use XSLoader ();
XSLoader::load 'PerlIO::via';
1;
==== //depot/perl/ext/PerlIO/via/via.xs#18 (text) ====
Index: perl/ext/PerlIO/via/via.xs
--- perl/ext/PerlIO/via/via.xs#17~34025~ 2008-06-08 07:00:59.000000000
-0700
+++ perl/ext/PerlIO/via/via.xs 2008-11-08 10:31:09.000000000 -0800
@@ -91,6 +91,10 @@
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);
End of Patch.