summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-06 15:01:34 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-06 15:45:30 +0100
commit6e03d7438337d3d902ac13cc268ff27c33c4bbe8 (patch)
treee8bfcb746027ce658cb4fe1668e1dc8c836e0375 /op.c
parent202d7cbdf6efc5f9c138c4460dce6d5b72603d2b (diff)
downloadperl-6e03d7438337d3d902ac13cc268ff27c33c4bbe8.tar.gz
Make the "..." flip-flop operator work in scalar context in when()
Diffstat (limited to 'op.c')
-rw-r--r--op.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/op.c b/op.c
index 943837e5e2..fe0ad142ce 100644
--- a/op.c
+++ b/op.c
@@ -5231,7 +5231,14 @@ S_looks_like_bool(pTHX_ const OP *o)
|| cSVOPo->op_sv == &PL_sv_no)
return TRUE;
+ else
+ return FALSE;
+ case OP_FLOP:
+ /* Detect "..." flip-flop operator */
+ if (cUNOPo->op_first->op_flags & OPf_SPECIAL)
+ return TRUE;
+
/* FALL THROUGH */
default:
return FALSE;