From: Rafael Garcia-Suarez Date: Fri, 9 Apr 2010 10:25:54 +0000 (+0200) Subject: when(scalar) without argument should be a syntax error [perl #74114] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=08fe1c446dfd7f69d072837b13864047af619591;p=p5sagit%2Fp5-mst-13.2.git when(scalar) without argument should be a syntax error [perl #74114] --- diff --git a/op.c b/op.c index 9c94cc8..76eb16f 100644 --- a/op.c +++ b/op.c @@ -5282,14 +5282,11 @@ S_looks_like_bool(pTHX_ const OP *o) && looks_like_bool(cLOGOPo->op_first->op_sibling)); case OP_NULL: + case OP_SCALAR: return ( o->op_flags & OPf_KIDS && looks_like_bool(cUNOPo->op_first)); - case OP_SCALAR: - return looks_like_bool(cUNOPo->op_first); - - case OP_ENTERSUB: case OP_NOT: case OP_XOR: