summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-10-03 20:36:36 +0100
committerDavid Mitchell <davem@iabyn.com>2010-10-03 20:52:10 +0100
commit6b2fb389897a68db92c38c22f79403607f0da303 (patch)
tree49785d092020ad8c214f8c929ea4e0cd6f94ed7c /pp_ctl.c
parent4aca2f62efca883199d7975f34b7fb876c280366 (diff)
downloadperl-6b2fb389897a68db92c38c22f79403607f0da303.tar.gz
G_KEEPERR sometimes set $@
eval_sv(sv,G_KEEPERR) is supposed to warn on errors, rather than set $@; but in the particular case of compile-time errors it still set $@ instead. See [perl ##3719].
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 244445281e..63a5f22d64 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1577,8 +1577,14 @@ Perl_qerror(pTHX_ SV *err)
PERL_ARGS_ASSERT_QERROR;
- if (PL_in_eval)
- sv_catsv(ERRSV, err);
+ if (PL_in_eval) {
+ if (PL_in_eval & EVAL_KEEPERR) {
+ Perl_ck_warner(aTHX_ packWARN(WARN_MISC), "\t(in cleanup) %s",
+ SvPV_nolen_const(err));
+ }
+ else
+ sv_catsv(ERRSV, err);
+ }
else if (PL_errors)
sv_catsv(PL_errors, err);
else