}
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]};
}
"&", "^", "|", "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>
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.