diff options
author | Kay_Röpke <kay@dolphin-services.de> | 2002-09-20 18:09:08 +0200 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-09-26 16:29:26 +0000 |
commit | 989dfb198ac9ac51842b1c51f1d0abd5c0143573 (patch) | |
tree | 52f08ee85f94ebeed93bba847ce60daa479ecb1c /op.c | |
parent | 7a75f23295b1c1b6088ac400a7ad3d07428a20c1 (diff) | |
download | perl-989dfb198ac9ac51842b1c51f1d0abd5c0143573.tar.gz |
[perl #10021] Fixing bareword usage under strict.pm
Message-Id: <8775B355-CCA2-11D6-AADE-000393414688@dolphin-services.de>
p4raw-id: //depot/perl@17931
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3883,8 +3883,12 @@ 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)) - Perl_warner(aTHX_ packWARN(WARN_BAREWORD), "Bareword found in conditional"); + if (ckWARN(WARN_BAREWORD) && (first->op_private & OPpCONST_BARE)) { + if (first->op_private & OPpCONST_BARE) + no_bareword_allowed(first); + else + Perl_warner(aTHX_ packWARN(WARN_BAREWORD), "Bareword found in conditional"); + } if ((type == OP_AND) == (SvTRUE(((SVOP*)first)->op_sv))) { op_free(first); *firstp = Nullop; |