summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorLukas Mai <l.mai@web.de>2016-10-21 00:10:15 +0200
committerTony Cook <tony@develop-help.com>2016-10-25 11:08:51 +1100
commita1b60c8dae6ad00c164e20cf9151bae68e85ab2d (patch)
tree4a2aedbd5f494b4928f7faadbce8471dc9b6fd41 /pp_ctl.c
parent4a59181454f23dbf43f396b924ff7434b63c9d98 (diff)
downloadperl-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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 0eb032d484..7b8dc5be8e 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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),