summaryrefslogtreecommitdiff
path: root/ext/Opcode
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-11-14 10:21:49 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-11-14 10:21:49 +0000
commited094fafab5cc8979a919ec8755493543b6bddf5 (patch)
treed3068544a31f301f4c4ebaa5c82faf19fe89c5dd /ext/Opcode
parentff689196a75c2757dfba08a8f95f0eb42fb81136 (diff)
downloadperl-ed094fafab5cc8979a919ec8755493543b6bddf5.tar.gz
sundry cleanups for cloned interpreters (only known failure mode
is due to regexps keeping non-constant data in their compiled structures) p4raw-id: //depot/perl@4579
Diffstat (limited to 'ext/Opcode')
-rw-r--r--ext/Opcode/Opcode.xs2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs
index 9b6e016bb8..63ff8aa711 100644
--- a/ext/Opcode/Opcode.xs
+++ b/ext/Opcode/Opcode.xs
@@ -253,6 +253,8 @@ PPCODE:
save_hptr(&PL_defstash); /* save current default stack */
/* the assignment to global defstash changes our sense of 'main' */
PL_defstash = gv_stashpv(Package, GV_ADDWARN); /* should exist already */
+ save_hptr(&PL_curstash);
+ PL_curstash = PL_defstash;
/* defstash must itself contain a main:: so we'll add that now */
/* take care with the ref counts (was cause of long standing bug) */