summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-09-06 14:57:03 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-09-06 14:57:03 +0000
commit523510151d8956fad467e60e7608e23344896482 (patch)
tree0bd481180c6b5cfe9517ed8cadf2c84325bfb2d0 /op.c
parent87fc0556b47941b30c7b531b3aa2a5ccc6fc77bb (diff)
downloadperl-523510151d8956fad467e60e7608e23344896482.tar.gz
state $foo if 0 shouldn't warn. Spotted by Abigail.
p4raw-id: //depot/perl@31805
Diffstat (limited to 'op.c')
-rw-r--r--op.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/op.c b/op.c
index fefe45227b..4cbb5e6a3d 100644
--- a/op.c
+++ b/op.c
@@ -4269,6 +4269,7 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp)
if ((o2->op_type == OP_PADSV || o2->op_type == OP_PADAV
|| o2->op_type == OP_PADHV)
&& o2->op_private & OPpLVAL_INTRO
+ && !(o2->op_private & OPpPAD_STATE)
&& ckWARN(WARN_DEPRECATED))
{
Perl_warner(aTHX_ packWARN(WARN_DEPRECATED),