state $foo if 0 shouldn't warn. Spotted by Abigail.
Rafael Garcia-Suarez [Thu, 6 Sep 2007 14:57:03 +0000 (14:57 +0000)]
p4raw-id: //depot/perl@31805

op.c

diff --git a/op.c b/op.c
index fefe452..4cbb5e6 100644 (file)
--- 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),