diff options
author | Lukas Mai <l.mai@web.de> | 2016-10-21 00:10:15 +0200 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-10-25 11:08:51 +1100 |
commit | a1b60c8dae6ad00c164e20cf9151bae68e85ab2d (patch) | |
tree | 4a2aedbd5f494b4928f7faadbce8471dc9b6fd41 /pp_ctl.c | |
parent | 4a59181454f23dbf43f396b924ff7434b63c9d98 (diff) | |
download | perl-a1b60c8dae6ad00c164e20cf9151bae68e85ab2d.tar.gz |
make do "a\0b" fail silently instead of throwing (RT #129928)
Also remove the label/goto from CLEAR_ERRSV because labels have function
scope, which means you couldn't use CLEAR_ERRSV more than once per
function without getting a "duplicate label" error.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3692,6 +3692,10 @@ S_require_file(pTHX_ SV *const sv) DIE(aTHX_ "Missing or undefined argument to require"); if (!IS_SAFE_PATHNAME(name, len, "require")) { + if (PL_op->op_type != OP_REQUIRE) { + CLEAR_ERRSV(); + RETPUSHUNDEF; + } DIE(aTHX_ "Can't locate %s: %s", pv_escape(newSVpvs_flags("",SVs_TEMP),name,len,len*2, NULL, SvUTF8(sv)?PERL_PV_ESCAPE_UNI:0), |