From: Dave Mitchell Date: Thu, 22 Jan 2004 00:24:51 +0000 (+0000) Subject: [perl #25147] C didn't give the X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=39a440a3c4b75def586b31dae242e1a577484c0e;p=p5sagit%2Fp5-mst-13.2.git [perl #25147] C didn't give the "Bareword not allowed" error unless warnings were enabled p4raw-id: //depot/perl@22194 --- diff --git a/op.c b/op.c index d53b130..b902fed 100644 --- a/op.c +++ b/op.c @@ -3343,12 +3343,10 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp) } } if (first->op_type == OP_CONST) { - if (ckWARN(WARN_BAREWORD) && (first->op_private & OPpCONST_BARE)) { - if (first->op_private & OPpCONST_STRICT) - no_bareword_allowed(first); - else + if (first->op_private & OPpCONST_STRICT) + no_bareword_allowed(first); + else if (ckWARN(WARN_BAREWORD) && (first->op_private & OPpCONST_BARE)) Perl_warner(aTHX_ packWARN(WARN_BAREWORD), "Bareword found in conditional"); - } if ((type == OP_AND) == (SvTRUE(((SVOP*)first)->op_sv))) { op_free(first); *firstp = Nullop;