"Constant subroutine redefined" mandatory warning
Doug MacEachern [Tue, 20 Jun 2000 21:23:56 +0000 (14:23 -0700)]
Message-ID: <Pine.LNX.4.10.10006202116340.321-100000@mojo.covalent.net>

p4raw-id: //depot/cfgperl@6228

op.c

diff --git a/op.c b/op.c
index 4591984..fb060d3 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4454,7 +4454,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
                goto withattrs;
            if ((const_sv = cv_const_sv(cv)))
                const_changed = sv_cmp(const_sv, op_const_sv(block, Nullcv));
-           if ((const_sv || const_changed) && ckWARN(WARN_REDEFINE))
+            if ((const_sv && const_changed) || ckWARN(WARN_REDEFINE))
            {
                line_t oldline = CopLINE(PL_curcop);
                CopLINE_set(PL_curcop, PL_copline);