Make ‘No such class’ apply to ${$ref}{key}, too
authorFather Chrysostomos <sprout@cpan.org>
Sun, 3 Nov 2013 22:48:58 +0000 (14:48 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 4 Nov 2013 00:29:37 +0000 (16:29 -0800)
commite6307ed02eedb576f00bd096a2c1ef64d22a08d2
tree9b274d1200a91a0c5641bfc27bb4f87846af235c
parentcbc13c3d0866ec08a907c47f5157a5987f558387
Make ‘No such class’ apply to ${$ref}{key}, too

$ perl -le 'use fields "foo"; my main $r; $r->{bar}'
No such class field "bar" in variable $r of type main at -e line 1.
$ perl -le 'use fields "foo"; my main $r; $$r{bar}'
No such class field "bar" in variable $r of type main at -e line 1.
$ perl -le 'use fields "foo"; my main $r; ${$r}{bar}'
$

Notice how the last one is silent.  There is already code to handle
the block for hash slices, so we can copy that.
op.c
t/lib/croak/op