summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorKay_Röpke <kay@dolphin-services.de>2002-09-20 18:09:08 +0200
committerhv <hv@crypt.org>2002-09-26 16:29:26 +0000
commit989dfb198ac9ac51842b1c51f1d0abd5c0143573 (patch)
tree52f08ee85f94ebeed93bba847ce60daa479ecb1c /op.c
parent7a75f23295b1c1b6088ac400a7ad3d07428a20c1 (diff)
downloadperl-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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/op.c b/op.c
index 67aeab0142..75d642f0e3 100644
--- a/op.c
+++ b/op.c
@@ -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;