diff options
author | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-01-12 08:03:58 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2010-01-12 10:43:38 +0100 |
commit | 963d9ce9328cdf8ad93ac7ab1d69b3613d5c4d1b (patch) | |
tree | 7b2ddd1e26739eceae1e64d5325056e912a8f823 /op.c | |
parent | 98adedefdf4028de094b5942453af485f2b9d5e8 (diff) | |
download | perl-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |