X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Foverload.pm;h=838c91fcee0479881aaa7909c8958eb9e2d4b6ac;hb=a5a165b1a650c2a559ea5115716f29e938b821fd;hp=d355f6aa85a834e234ca654f7bc11e4357f6822c;hpb=bbc7dcd2bd43efd6773e46b614c6eb1db5af78d2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/overload.pm b/lib/overload.pm index d355f6a..838c91f 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -267,7 +267,7 @@ is called with arguments C<($a,undef,'')> when $a++ is executed. Two types of mutators have different calling conventions: -=over 4 +=over =item C<++> and C<--> @@ -298,7 +298,7 @@ if C<+=> is not overloaded. =back -B Due to the presense of assignment versions of operations, +B Due to the presence of assignment versions of operations, routines which may be called in assignment context may create self-referential structures. Currently Perl will not free self-referential structures until cycles are C broken. You may get problems @@ -450,7 +450,7 @@ A computer-readable form of the above table is available in the hash Inheritance interacts with overloading in two ways. -=over 4 +=over =item Strings as values of C directive @@ -852,7 +852,7 @@ C<$a = $b> values of $a and $b become I. On the other hand, anyone who has used algebraic notation knows the expressive power of the arithmetic metaphor. Overloading works hard to enable this metaphor while preserving the Perlian way as far as -possible. Since it is not not possible to freely mix two contradicting +possible. Since it is not possible to freely mix two contradicting metaphors, overloading allows the arithmetic way to write things I. The way it is done is described in L. @@ -969,7 +969,7 @@ TIEHASH() method is a scalar reference. Second, we create a new tied hash each time the hash syntax is used. This allows us not to worry about a possibility of a reference loop, -would would lead to a memory leak. +which would lead to a memory leak. Both these problems can be cured. Say, if we want to overload hash dereference on a reference to an object which is I as a @@ -1028,7 +1028,7 @@ reference to the intermediate array, which keeps a reference to an actual array, and the access hash. The tie()ing object for the access hash is a reference to a reference to the actual array, so -=over 4 +=over =item * @@ -1058,8 +1058,8 @@ Put this in F in your Perl library directory: } This module is very unusual as overloaded modules go: it does not -provide any usual overloaded operators, instead it provides the -L operator C. In this example the corresponding +provide any usual overloaded operators, instead it provides the L operator C. In this example the corresponding subroutine returns an object which encapsulates operations done over the objects: C contains C<['n', 3]>, C<2 + new symbolic 3> contains C<['+', 2, ['n', 3]]>. @@ -1135,7 +1135,7 @@ which outputs and one can inspect the value in debugger using all the possible methods. -Something is is still amiss: consider the loop variable $cnt of the +Something is still amiss: consider the loop variable $cnt of the script. It was a number, not an object. We cannot make this value of type C, since then the loop will not terminate.