summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-11-08 06:04:20 -0800
committerFather Chrysostomos <sprout@cpan.org>2013-11-08 08:15:59 -0800
commit2186f8734350df0f69b852c67f593773a77590bc (patch)
treee37ff3878dd458c122881956be04c4333d220e92 /dump.c
parent6a642c21192e08a710804b462f8c97902797d5b4 (diff)
downloadperl-2186f8734350df0f69b852c67f593773a77590bc.tar.gz
Warn for all uses of %hash{...} in scalar cx
and reword the warning slightly. See <20131027204944.20489.qmail@lists-nntp.develooper.com>. To avoid getting a warning about scalar context for ‘delete %a[1,2]’, which dies anyway, I stopped scalar context from being applied to delete’s argument. Scalar context is not meaningful here anyway, and the context is not really scalar. This also means that ‘delete sort’ no longer produces a warning about scalar context before dying, so I added a test for that.
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/dump.c b/dump.c
index 78e9aa93ab..a5061d3988 100644
--- a/dump.c
+++ b/dump.c
@@ -960,8 +960,7 @@ S_op_private_to_names(pTHX_ SV *tmpsv, U32 optype, U32 op_private) {
(UV)(oppriv & OPpPADRANGE_COUNTMASK)); \
if ( (o->op_type == OP_RV2HV || o->op_type == OP_RV2AV || \
o->op_type == OP_PADAV || o->op_type == OP_PADHV || \
- o->op_type == OP_ASLICE || o->op_type == OP_HSLICE || \
- o->op_type == OP_KVHSLICE || o->op_type == OP_KVASLICE) \
+ o->op_type == OP_ASLICE || o->op_type == OP_HSLICE) \
&& oppriv & OPpSLICEWARNING ) \
sv_catpvs(tmpsv, ",SLICEWARNING"); \
if (SvCUR(tmpsv)) { \