From: Rafael Garcia-Suarez Date: Tue, 24 Mar 2009 13:16:15 +0000 (+0100) Subject: Fix equivalent code in perlsyn for Array~~Hash X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fc8390768718c75e7007d3afdce4bc61fb3ea97b;p=p5sagit%2Fp5-mst-13.2.git Fix equivalent code in perlsyn for Array~~Hash It's an "any", not an "all". The synopsis 3 for Perl 6 has this code : when $_ is an Array, and X is a Hash, $_ ~~ X means X.{any @$_}:exists. Note that the implementation is right already (and was right in 5.10). --- diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index dbaa7a9..f356d55 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -688,7 +688,7 @@ entries apply in those cases. Any CodeRef scalar sub truth $b->($a) Hash Hash hash keys identical [sort keys %$a]~~[sort keys %$b] - Array Hash hash slice existence @$a == grep $_ ~~ $b, @$a + Array Hash hash slice existence grep $_ ~~ $b, @$a Regex Hash hash key grep grep /$a/, keys %$b undef Hash always false (undef can't be a key) Any Hash hash entry existence exists $b->{$a}