From: Perl 5 Porters Date: Tue, 18 Jun 1996 07:41:37 +0000 (+0000) Subject: perl 5.003_01: lib/overload.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3bc6ec8038d110d76f73b0833a2cc894ac5ab2cb;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_01: lib/overload.pm Drop support for null package name or package "0" Document fallbacks for logical negation --- diff --git a/lib/overload.pm b/lib/overload.pm index 54d2cbb..28e7d0b 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -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 is used to compare values subject to C. "&", "^", "|", "neg", "!", "~", "C" stands for unary minus. If the method for C 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", or "C<\"\">", or "C<0+>". =item * I @@ -361,6 +363,11 @@ can be expressed in terms of C<$aE0> and C<-$a> (or C<0-$a>). can be expressed in terms of subtraction. +=item I + +C and C can be expressed in terms of boolean conversion, or +string or numerical conversion. + =item I can be expressed in terms of string conversion.