This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Warn for all uses of %hash{...} in scalar cx
authorFather Chrysostomos <sprout@cpan.org>
Fri, 8 Nov 2013 14:04:20 +0000 (06:04 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 8 Nov 2013 16:15:59 +0000 (08:15 -0800)
commit2186f8734350df0f69b852c67f593773a77590bc
treee37ff3878dd458c122881956be04c4333d220e92
parent6a642c21192e08a710804b462f8c97902797d5b4
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.
dump.c
ext/B/B/Concise.pm
op.c
op.h
pod/perldiag.pod
t/lib/croak/op
t/op/kvaslice.t
t/op/kvhslice.t
toke.c