diff options
author | Abigail <abigail@abigail.be> | 1999-01-19 14:14:10 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-01-21 15:20:48 +0000 |
commit | f610777fe6e5155eff71b75c639bbca2c354315c (patch) | |
tree | b92d531718512a0c87f9336e09b78eb9026ed974 /lib/overload.pm | |
parent | 4e3d48450685e41306196aa7ed47417ebfb08dd0 (diff) | |
download | perl-f610777fe6e5155eff71b75c639bbca2c354315c.tar.gz |
CPAN update (CPAN-1.44_54) from Andreas and
jumbo doc patch from Abigail.
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL 3 lib/AutoLoader.pm] Typos
Date: Tue, 19 Jan 1999 19:14:10 -0500 (EST)
Message-ID: <19990120001410.19645.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/CGI.pm] Typos
Date: Tue, 19 Jan 1999 19:32:42 -0500 (EST)
Message-ID: <19990120003242.19938.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/CPAN.pm] Typos
Date: Tue, 19 Jan 1999 19:40:41 -0500 (EST)
Message-ID: <19990120004041.20052.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/Carp.pm] Typo
Date: Tue, 19 Jan 1999 19:43:12 -0500 (EST)
Message-ID: <19990120004312.20152.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/Cwd.pm] Typo
Date: Tue, 19 Jan 1999 19:44:29 -0500 (EST)
Message-ID: <19990120004429.20190.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/Safe.pm] Typo
Date: Tue, 19 Jan 1999 19:52:41 -0500 (EST)
Message-ID: <19990120005241.20693.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/SelfLoader.pm] Typos
Date: Tue, 19 Jan 1999 19:55:25 -0500 (EST)
Message-ID: <19990120005525.20788.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/Symbol.pm] Typo
Date: Tue, 19 Jan 1999 19:58:21 -0500 (EST)
Message-ID: <19990120005821.20926.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/Test.pm] Typo
Date: Tue, 19 Jan 1999 20:00:02 -0500 (EST)
Message-ID: <19990120010002.20973.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/ops.pm] Typo
Date: Tue, 19 Jan 1999 20:39:09 -0500 (EST)
Message-ID: <19990120013909.23085.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/diagnostics.pm] Typos (ignore previous patch for this file...)
Date: Tue, 19 Jan 1999 20:38:23 -0500 (EST)
Message-ID: <19990120013823.23015.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/overload.pm] Typos
Date: Tue, 19 Jan 1999 20:58:16 -0500 (EST)
Message-ID: <19990120015817.24306.qmail@alexandra.wayne.fnx.com>
From: abigail@fnx.com
To: perl5-porters@perl.org (Perl Porters)
Subject: [PATCH 5.005_03 TRIAL3 lib/re.pm] Typos
Date: Tue, 19 Jan 1999 21:03:26 -0500 (EST)
Message-ID: <19990120020326.24373.qmail@alexandra.wayne.fnx.com>
p4raw-id: //depot/cfgperl@2665
Diffstat (limited to 'lib/overload.pm')
-rw-r--r-- | lib/overload.pm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/overload.pm b/lib/overload.pm index 81d9a120ba..6508ad1cf4 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -276,7 +276,7 @@ value of their arguments, and may leave it as is. The result is going to be assigned to the value in the left-hand-side if different from this value. -This allows for the same method to be used as averloaded C<+=> and +This allows for the same method to be used as overloaded C<+=> and C<+>. Note that this is I<allowed>, but not recommended, since by the semantic of L<"Fallback"> Perl will call the method for C<+> anyway, if C<+=> is not overloaded. @@ -285,7 +285,7 @@ if C<+=> is not overloaded. B<Warning.> Due to the presense of assignment versions of operations, routines which may be called in assignment context may create -self-referencial structures. Currently Perl will not free self-referential +self-referential structures. Currently Perl will not free self-referential structures until cycles are C<explicitly> broken. You may get problems when traversing your structures too. @@ -558,7 +558,7 @@ C<'='> was overloaded with C<\&clone>. =back -Same behaviour is triggered by C<$b = $a++>, which is consider a synonim for +Same behaviour is triggered by C<$b = $a++>, which is consider a synonym for C<$b = $a; ++$a>. =head1 MAGIC AUTOGENERATION @@ -777,7 +777,7 @@ There is no size penalty for data if overload is not used. The only size penalty if overload is used in some package is that I<all> the packages acquire a magic during the next C<bless>ing into the package. This magic is three-words-long for packages without -overloading, and carries the cache tabel if the package is overloaded. +overloading, and carries the cache table if the package is overloaded. Copying (C<$a=$b>) is shallow; however, a one-level-deep copying is carried out before any operation that can imply an assignment to the @@ -789,8 +789,8 @@ to be changed are constant (but this is not enforced). =head1 Metaphor clash -One may wonder why the semantic of overloaded C<=> is so counterintuive. -If it I<looks> counterintuive to you, you are subject to a metaphor +One may wonder why the semantic of overloaded C<=> is so counter intuitive. +If it I<looks> counter intuitive to you, you are subject to a metaphor clash. Here is a Perl object metaphor: @@ -1025,7 +1025,7 @@ Put this in F<symbolic.pm> 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<Last Resort> operator C<nomethod>. In this example the corresponding -subroutine returns an object which encupsulates operations done over +subroutine returns an object which encapsulates operations done over the objects: C<new symbolic 3> contains C<['n', 3]>, C<2 + new symbolic 3> contains C<['+', 2, ['n', 3]]>. @@ -1112,7 +1112,7 @@ compare an object to 0. In fact, it is easier to write a numeric conversion routine. Here is the text of F<symbolic.pm> with such a routine added (and -slightly modifed str()): +slightly modified str()): package symbolic; # Primitive symbolic calculator use overload @@ -1151,7 +1151,7 @@ slightly modifed str()): } All the work of numeric conversion is done in %subr and num(). Of -course, %subr is not complete, it contains only operators used in teh +course, %subr is not complete, it contains only operators used in the example below. Here is the extra-credit question: why do we need an explicit recursion in num()? (Answer is at the end of this section.) @@ -1181,7 +1181,7 @@ mutator methods (C<++>, C<-=> and so on), does not do deep copying (not required without mutators!), and implements only those arithmetic operations which are used in the example. -To implement most arithmetic operattions is easy, one should just use +To implement most arithmetic operations is easy, one should just use the tables of operations, and change the code which fills %subr to my %subr = ( 'n' => sub {$_[0]} ); @@ -1259,8 +1259,8 @@ the argument of num(). If you wonder why defaults for conversion are different for str() and num(), note how easy it was to write the symbolic calculator. This simplicity is due to an appropriate choice of defaults. One extra -note: due to teh explicit recursion num() is more fragile than sym(): -we need to explicitly check for the type of $a and $b. If componets +note: due to the explicit recursion num() is more fragile than sym(): +we need to explicitly check for the type of $a and $b. If components $a and $b happen to be of some related type, this may lead to problems. =head2 I<Really> symbolic calculator |