perl 5.003_06: pod/perlcall.pod pod/perldata.pod pod/perldebug.pod pod/perlembed...
[p5sagit/p5-mst-13.2.git] / lib / overload.pm
index 54d2cbb..20411ea 100644 (file)
@@ -26,18 +26,18 @@ sub unimport {
 }
 
 sub Overloaded {
-  defined ($package = ref $_[0]) and defined %{$package . "::OVERLOAD"};
+  ($package = ref $_[0]) and defined %{$package . "::OVERLOAD"};
 }
 
 sub OverloadedStringify {
-  defined ($package = ref $_[0]) and 
+  ($package = ref $_[0]) and 
     defined %{$package . "::OVERLOAD"} and 
       exists $ {$package . "::OVERLOAD"}{'""'} and
        defined &{$ {$package . "::OVERLOAD"}{'""'}};
 }
 
 sub Method {
-  defined ($package = ref $_[0]) and 
+  ($package = ref $_[0]) and 
     defined %{$package . "::OVERLOAD"} and 
       $ {$package . "::OVERLOAD"}{$_[1]};
 }
@@ -186,7 +186,9 @@ arrays, C<cmp> is used to compare values subject to C<use overload>.
     "&", "^", "|", "neg", "!", "~",
 
 "C<neg>" stands for unary minus.  If the method for C<neg> is not
-specified, it can be autogenerated using the method for subtraction.
+specified, it can be autogenerated using the method for
+subtraction. If the method for "C<!>" is not specified, it can be
+autogenerated using the methods for "C<bool>", or "C<\"\">", or "C<0+>".
 
 =item * I<Increment and decrement>
 
@@ -201,7 +203,7 @@ postfix form.
     "atan2", "cos", "sin", "exp", "abs", "log", "sqrt",
 
 If C<abs> is unavailable, it can be autogenerated using methods
-for "<" or "<=>" combined with either unary minus or subtraction.
+for "E<lt>" or "E<lt>=E<gt>" combined with either unary minus or subtraction.
 
 =item * I<Boolean, string and numeric conversion>
 
@@ -361,6 +363,11 @@ can be expressed in terms of C<$aE<lt>0> and C<-$a> (or C<0-$a>).
 
 can be expressed in terms of subtraction.
 
+=item I<Negation>
+
+C<!> and C<not> can be expressed in terms of boolean conversion, or
+string or numerical conversion.
+
 =item I<Concatenation>
 
 can be expressed in terms of string conversion.
@@ -369,7 +376,7 @@ can be expressed in terms of string conversion.
 
 can be expressed in terms of its "spaceship" counterpart: either
 C<E<lt>=E<gt>> or C<cmp>:
+
     <, >, <=, >=, ==, !=       in terms of <=>
     lt, gt, le, ge, eq, ne     in terms of cmp
 
@@ -469,7 +476,7 @@ to be changed are constant (but this is not enforced).
 
 =head1 AUTHOR
 
-Ilya Zakharevich <F<ilya@math.mps.ohio-state.edu>>.
+Ilya Zakharevich E<lt>F<ilya@math.mps.ohio-state.edu>E<gt>.
 
 =head1 DIAGNOSTICS