diff options
author | David Mitchell <davem@iabyn.com> | 2010-10-03 20:36:36 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-10-03 20:52:10 +0100 |
commit | 6b2fb389897a68db92c38c22f79403607f0da303 (patch) | |
tree | 49785d092020ad8c214f8c929ea4e0cd6f94ed7c /pp_ctl.c | |
parent | 4aca2f62efca883199d7975f34b7fb876c280366 (diff) | |
download | perl-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.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |