diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2004-01-22 00:24:51 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-01-22 00:24:51 +0000 |
commit | 39a440a3c4b75def586b31dae242e1a577484c0e (patch) | |
tree | c666a1590ea54ba17907d82a5e942f4f5c1c6237 /op.c | |
parent | add36b05eee71712b766a468125f1a3c3d017f66 (diff) | |
download | perl-39a440a3c4b75def586b31dae242e1a577484c0e.tar.gz |
[perl #25147] C<use strict; print if foo> didn't give the
"Bareword not allowed" error unless warnings were enabled
p4raw-id: //depot/perl@22194
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; |