This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Mention parallel testing in INSTALL and perl5110delta.pod
[perl5.git] / pod / perlsyn.pod
index 94a5677..2ba30d8 100644 (file)
@@ -688,19 +688,19 @@ that applies determines the match behaviour (which is thus mostly
 determined by the type of the right operand). Note that the smart match
 implicitly dereferences any non-blessed hash or array ref, so the "Hash"
 and "Array" entries apply in those cases. (For blessed references, the
-"Any" entry apply.)
+"Object" entries apply.)
 
     $a      $b        Type of Match Implied    Matching Code
     ======  =====     =====================    =============
     Any     undef     undefined                !defined $a
 
-    Any     Object   invokes ~~ overloading on $object, or dies
+    Any     Object    invokes ~~ overloading on $object, or dies
 
     Hash    CodeRef   sub truth for each key[1] !grep { !$b->($_) } keys %$a
     Array   CodeRef   sub truth for each elt[1] !grep { !$b->($_) } @$a
     Any     CodeRef   scalar sub truth          $b->($a)
 
-    Hash    Hash      hash keys identical      [sort keys %$a]~~[sort keys %$b]
+    Hash    Hash      hash keys identical (every key is found in both hashes)
     Array   Hash      hash slice existence     grep { exists $b->{$_} } @$a
     Regex   Hash      hash key grep            grep /$a/, keys %$b
     undef   Hash      always false (undef can't be a key)
@@ -717,11 +717,11 @@ and "Array" entries apply in those cases. (For blessed references, the
     Array   Regex     array grep               grep /$b/, @$a
     Any     Regex     pattern match            $a =~ /$b/
 
+    Object  Any       invokes ~~ overloading on $object, or falls back:
     Any     Num       numeric equality         $a == $b
     Num     numish[4] numeric equality         $a == $b
     Any     Any       string equality          $a eq $b
 
-
  1 - empty hashes or arrays will match.
  2 - that is, each element smart-matches the element of same index in the
      other array. [3]
@@ -736,9 +736,7 @@ C<grep>, the smart match operator will short-circuit whenever it can.
 
 You can change the way that an object is matched by overloading
 the C<~~> operator. This trumps the usual smart match semantics.
-See L<overload>. Since smart matching dispatch is driven by the
-right hand side argument, overloading applies only when the object
-is on the right of C<~~>.
+See L<overload>.
 
 It should be noted that C<~~> will refuse to work on objects that
 don't overload it (in order to avoid relying on the object's