summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-11-19 11:13:24 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-06 08:42:05 -0800
commit2bf54cc6effa09e0b0bb5bf18c7a215f8d75a200 (patch)
tree282a6040e511b7aa337cbc1e74cd9d4c474adfb8 /pp_ctl.c
parentbbde7ba366f7e8eba62f86287e5267085c03d7dc (diff)
downloadperl-2bf54cc6effa09e0b0bb5bf18c7a215f8d75a200.tar.gz
[perl #80630] Make eval"" return empty list for syntax errors
Up till now, eval"" in list context was returning a list containing undef for syntax errors and an empty list for run-time errors.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index b38e8e6ab8..953a749948 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3649,7 +3649,7 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq, HV *hh)
sv_setpvs(ERRSV, "Compilation error");
}
}
- PUSHs(&PL_sv_undef);
+ if (gimme != G_ARRAY) PUSHs(&PL_sv_undef);
PUTBACK;
return FALSE;
}