summaryrefslogtreecommitdiff
path: root/run.c
diff options
context:
space:
mode:
Diffstat (limited to 'run.c')
-rw-r--r--run.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/run.c b/run.c
index 054abfedae..702a9b99ce 100644
--- a/run.c
+++ b/run.c
@@ -114,9 +114,10 @@ S_deb_curcv(I32 ix)
PERL_CONTEXT *cx = &cxstack[ix];
if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT)
return cx->blk_sub.cv;
- else if (CxTYPE(cx) == CXt_EVAL && PL_compcv)
- /* XXX Should be PL_compcv? */
- return Nullcv;
+ else if (CxTYPE(cx) == CXt_EVAL && CxREALEVAL(cx))
+ return PL_compcv;
+ else if (CxTYPE(cx) == CXt_EVAL && !CxTRYBLOCK(cx))
+ return PL_compcv;
else if (ix == 0 && PL_curstackinfo->si_type == PERLSI_MAIN)
return PL_main_cv;
else if (ix <= 0)