summaryrefslogtreecommitdiff
path: root/lib/overload.pm
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-01-18 13:32:32 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-01-18 13:45:22 -0800
commit406f8c258486bcc700f9b7254f1e1bee5734083f (patch)
tree741272084089509e03f89b510f886e1257989fa3 /lib/overload.pm
parentb877326b8a0e2afc3bce40b0de34dc6d5e5b9b98 (diff)
downloadperl-406f8c258486bcc700f9b7254f1e1bee5734083f.tar.gz
overload.pm: spaces after dots; wording tweak
Diffstat (limited to 'lib/overload.pm')
-rw-r--r--lib/overload.pm33
1 files changed, 17 insertions, 16 deletions
diff --git a/lib/overload.pm b/lib/overload.pm
index eb39c94f7a..749f731d1b 100644
--- a/lib/overload.pm
+++ b/lib/overload.pm
@@ -272,7 +272,7 @@ The second argument is the other operand, or C<undef> in the
case of a unary operator.
The third argument is set to TRUE if (and only if) the two
-operands have been swapped. Perl may do this to ensure that the
+operands have been swapped. Perl may do this to ensure that the
first argument (C<$self>) is an object implementing the overloaded
operation, in line with general object calling conventions.
For example, if C<$x> and C<$y> are C<Number>s:
@@ -288,7 +288,7 @@ have not been specified in the C<use overload> directive,
according to the rules for L<Magic Autogeneration> described later.
For example, the C<use overload> above declared no subroutine
for any of the operators C<-->, C<neg> (the overload key for
-unary minus), or C<-=>. Thus
+unary minus), or C<-=>. Thus
operation | generates a call to
============|======================
@@ -487,7 +487,7 @@ If the corresponding operation for this value is overloaded too,
the operation will be called again with this value.
As a special case if the overload returns the object itself then it will
-be used directly. An overloaded conversion returning the object is
+be used directly. An overloaded conversion returning the object is
probably a bug, because you're likely to get something that looks like
C<YourPackage=HASH(0x8172b34)>.
@@ -521,7 +521,7 @@ second argument (that is, in the slot that for binary operators
is used to pass the second operand).
Calling an overloaded filetest operator does not affect the stat value
-associated with the special filehandle C<_>. It still refers to the
+associated with the special filehandle C<_>. It still refers to the
result of the last C<stat>, C<lstat> or unoverloaded filetest.
This overload was introduced in Perl 5.12.
@@ -678,7 +678,7 @@ Since some operations can be automatically generated from others, there is
a minimal set of operations that need to be overloaded in order to have
the complete set of overloaded operations at one's disposal.
Of course, the autogenerated operations may not do exactly what the user
-expects. The minimal set is:
+expects. The minimal set is:
+ - * / % ** << >> x
<=> cmp
@@ -778,7 +778,7 @@ Note:
The subroutine for C<'='> does not overload the Perl assignment
operator: it is used only to allow mutators to work as described
-here. (See L</Assignments> above.)
+here. (See L</Assignments> above.)
=item *
@@ -971,7 +971,8 @@ Package C<overload.pm> provides the following public functions:
=item overload::StrVal(arg)
-Gives string value of C<arg> as in absence of stringify overloading. If you
+Gives the string value of C<arg> as in the
+absence of stringify overloading. If you
are using this to get the address of a reference (useful for checking if two
references point to the same thing) then you may be better off using
C<Scalar::Util::refaddr()>, which is faster.
@@ -1056,8 +1057,8 @@ What follows is subject to change RSN.
The table of methods for all operations is cached in magic for the
symbol table hash for the package. The cache is invalidated during
processing of C<use overload>, C<no overload>, new function
-definitions, and changes in @ISA. However, this invalidation remains
-unprocessed until the next C<bless>ing into the package. Hence if you
+definitions, and changes in @ISA. However, this invalidation remains
+unprocessed until the next C<bless>ing into the package. Hence if you
want to change overloading structure dynamically, you'll need an
additional (fake) C<bless>ing to update the table.
@@ -1065,7 +1066,7 @@ additional (fake) C<bless>ing to update the table.
queue. This is how a single variable may participate in multiple
forms of magic simultaneously. For instance, environment variables
regularly have two forms at once: their %ENV magic and their taint
-magic. However, the magic which implements overloading is applied to
+magic. However, the magic which implements overloading is applied to
the stashes, which are rarely used directly, thus should not slow down
Perl.)
@@ -1082,10 +1083,10 @@ in doubt, test your speed with C<use overload> and without it. So far
there have been no reports of substantial speed degradation if Perl is
compiled with optimization turned on.
-There is no size penalty for data if overload is not used. The only
+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
+package. This magic is three-words-long for packages without
overloading, and carries the cache table if the package is overloaded.
It is expected that arguments to methods that are not explicitly supposed
@@ -1579,8 +1580,8 @@ induces diagnostic messages.
Using the C<m> command of Perl debugger (see L<perldebug>) one can
deduce which operations are overloaded (and which ancestor triggers
-this overloading). Say, if C<eq> is overloaded, then the method C<(eq>
-is shown by debugger. The method C<()> corresponds to the C<fallback>
+this overloading). Say, if C<eq> is overloaded, then the method C<(eq>
+is shown by debugger. The method C<()> corresponds to the C<fallback>
key (in fact a presence of this method shows that this package has
overloading enabled, and it is what is used by the C<Overloaded>
function of module C<overload>).
@@ -1601,7 +1602,7 @@ The arguments should come in pairs.
=item '%s' is not a code reference
(W) The second (fourth, sixth, ...) argument of overload::constant needs
-to be a code reference. Either an anonymous subroutine, or a reference
+to be a code reference. Either an anonymous subroutine, or a reference
to a subroutine.
=item overload arg '%s' is invalid
@@ -1690,7 +1691,7 @@ The symbol table is filled with names looking like line-noise.
=item *
For the purpose of inheritance every overloaded package behaves as if
-C<fallback> is present (possibly undefined). This may create
+C<fallback> is present (possibly undefined). This may create
interesting effects if some package is not overloaded, but inherits
from two overloaded packages.