when(scalar) without argument should be a syntax error [perl #74114]
Rafael Garcia-Suarez [Fri, 9 Apr 2010 10:25:54 +0000 (12:25 +0200)]
op.c

diff --git a/op.c b/op.c
index 9c94cc8..76eb16f 100644 (file)
--- 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: