From: Rafael Garcia-Suarez Date: Tue, 26 May 2009 12:57:22 +0000 (+0200) Subject: A couple of nits in the ~~ perldelta entry X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9091a618773bfbb9dc94067f69bea900a2c09c1d;p=p5sagit%2Fp5-mst-13.2.git A couple of nits in the ~~ perldelta entry (Thanks to Ricardo) --- diff --git a/pod/perl5110delta.pod b/pod/perl5110delta.pod index 69e1ba2..54292e0 100644 --- a/pod/perl5110delta.pod +++ b/pod/perl5110delta.pod @@ -56,7 +56,7 @@ choose to ignore it). =item * C<%hash ~~ sub {}> and C<@array ~~ sub {}> now test that the subroutine -returns a true value for each key of the hash (resp. element of the +returns a true value for each key of the hash (or element of the array), instead of passing the whole hash or array as a reference to the subroutine. @@ -85,7 +85,7 @@ when an object overloading C<~~> appears on the right side of the operator, the overload routine will always be called (with a 3rd argument set to a true value, see L.) However, when the object will appear on the left, the overload routine will be called only when the -rightmost argument is a scalar. This way distributivity of smart match +rightmost argument is a simple scalar. This way distributivity of smart match across arrays is not broken, as well as the other behaviours with complex types (coderefs, hashes, regexes). Thus, writers of overloading routines for smart match need to worry only with comparing against a scalar, and