summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-07-19 14:16:38 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-07-21 04:55:51 +0000
commitcbce877f83f260d9f1664e6a2860d1dd13e47de9 (patch)
treeb222fabf666b80a826e1ee4c81cf2f6fc09d5194 /pp_ctl.c
parent5c08494a9097815fa21f0f73751af672efd9ed24 (diff)
downloadperl-cbce877f83f260d9f1664e6a2860d1dd13e47de9.tar.gz
Compile (?{}) into a correct package
Message-Id: <199807192216.SAA10482@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@1601
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 0750220063..68c50a5f40 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2252,6 +2252,10 @@ sv_compile_2op(SV *sv, OP** startop, char *code, AV** avp)
SAVETMPS;
/* switch to eval mode */
+ if (PL_curcop == &PL_compiling) {
+ SAVESPTR(PL_compiling.cop_stash);
+ PL_compiling.cop_stash = PL_curstash;
+ }
SAVESPTR(PL_compiling.cop_filegv);
SAVEI16(PL_compiling.cop_line);
sprintf(tmpbuf, "_<(%.10s_eval %lu)", code, (unsigned long)++PL_evalseq);