In perl.git, the branch smartmatch has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/fc8390768718c75e7007d3afdce4bc61fb3ea97b?hp=da9849c509b34ed24c215ecae6a458108a733936>

- Log -----------------------------------------------------------------
commit fc8390768718c75e7007d3afdce4bc61fb3ea97b
Author: Rafael Garcia-Suarez <[email protected]>
Date:   Tue Mar 24 14:16:15 2009 +0100

    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).
-----------------------------------------------------------------------

Summary of changes:
 pod/perlsyn.pod |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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}

--
Perl5 Master Repository

Reply via email to