summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index edbe7b19ab..42811f5619 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2727,8 +2727,11 @@ S_doeval(pTHX_ int gimme, OP** startop)
av_store(comppadlist, 1, (SV*)PL_comppad);
CvPADLIST(PL_compcv) = comppadlist;
- if (!saveop || saveop->op_type != OP_REQUIRE)
+ if (!saveop ||
+ (saveop->op_type != OP_REQUIRE && saveop->op_type != OP_DOFILE))
+ {
CvOUTSIDE(PL_compcv) = (CV*)SvREFCNT_inc(caller);
+ }
SAVEFREESV(PL_compcv);