summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgs@consttype.org>2010-01-12 08:03:58 +0100
committerRafael Garcia-Suarez <rgs@consttype.org>2010-01-12 10:43:38 +0100
commit963d9ce9328cdf8ad93ac7ab1d69b3613d5c4d1b (patch)
tree7b2ddd1e26739eceae1e64d5325056e912a8f823 /op.c
parent98adedefdf4028de094b5942453af485f2b9d5e8 (diff)
downloadperl-963d9ce9328cdf8ad93ac7ab1d69b3613d5c4d1b.tar.gz
The new lvalue warning should not be turned on by default
A check for the warning category was missing from commit 885ef6f56b61fd750ef3b1fa614d11480baac635. Also, document the warning category in perldiag.
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/op.c b/op.c
index a7205cb9f7..56196224ca 100644
--- a/op.c
+++ b/op.c
@@ -5714,7 +5714,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
)&& !attrs) {
if (CvFLAGS(PL_compcv)) {
/* might have had built-in attrs applied */
- if (CvLVALUE(PL_compcv) && ! CvLVALUE(cv))
+ if (CvLVALUE(PL_compcv) && ! CvLVALUE(cv) && ckWARN(WARN_MISC))
Perl_warner(aTHX_ packWARN(WARN_MISC), "lvalue attribute ignored after the subroutine has been defined");
CvFLAGS(cv) |= (CvFLAGS(PL_compcv) & CVf_BUILTIN_ATTRS & ~CVf_LVALUE);
}