summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2009-12-20 11:01:34 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2009-12-20 12:08:14 +0100
commit32e2a35d72e0f63c2f9a8de6041a24d35271a7ff (patch)
treeadfdad15adc11688671a3ae4df68e9e4173f71b5 /op.c
parent1f5724d9cef367bf0da465162d6a9092c1aa173a (diff)
downloadperl-32e2a35d72e0f63c2f9a8de6041a24d35271a7ff.tar.gz
Make eval {} compile directly to OP_ENTERTRY
This way, it's correctly caught and blocked by Safe, separately from eval "".
Diffstat (limited to 'op.c')
-rw-r--r--op.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/op.c b/op.c
index 19d7d5e43c..88a31d33fa 100644
--- a/op.c
+++ b/op.c
@@ -3092,6 +3092,7 @@ Perl_newUNOP(pTHX_ I32 type, I32 flags, OP *first)
|| (PL_opargs[type] & OA_CLASS_MASK) == OA_FILESTATOP
|| (PL_opargs[type] & OA_CLASS_MASK) == OA_LOOPEXOP
|| type == OP_SASSIGN
+ || type == OP_ENTERTRY
|| type == OP_NULL );
if (!first)
@@ -6600,8 +6601,6 @@ Perl_ck_eval(pTHX_ OP *o)
/* establish postfix order */
enter->op_next = (OP*)enter;
- CHECKOP(OP_ENTERTRY, enter);
-
o = prepend_elem(OP_LINESEQ, (OP*)enter, (OP*)kid);
o->op_type = OP_LEAVETRY;
o->op_ppaddr = PL_ppaddr[OP_LEAVETRY];