Upgrade to ExtUtils::CBuilder 0.17
[p5sagit/p5-mst-13.2.git] / lib / overload.pm
index 8a07efe..d511f2c 100644 (file)
@@ -1,6 +1,6 @@
 package overload;
 
-our $VERSION = '1.03';
+our $VERSION = '1.04';
 
 $overload::hint_bits = 0x20000; # HINT_LOCALIZE_HH
 
@@ -668,6 +668,23 @@ value is a scalar and not a reference.
 
 =back
 
+=head1 Minimal set of overloaded operations
+
+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. See L<MAGIC AUTOGENERATION> above. The minimal set is:
+
+    + - * / % ** << >> x
+    <=> cmp
+    & | ^ ~
+    atan2 cos sin exp log sqrt int
+
+Additionally, you need to define at least one of string, boolean or
+numeric conversions because any one can be used to emulate the others.
+The string conversion can also be used to emulate concatenation.
+
 =head1 Losing overloading
 
 The restriction for the comparison operation is that even if, for example,
@@ -783,9 +800,6 @@ From these methods they may be called as
          overload::constant integer => sub {Math::BigInt->new(shift)};
        }
 
-B<BUGS> Currently overloaded-ness of constants does not propagate
-into C<eval '...'>.
-
 =head1 IMPLEMENTATION
 
 What follows is subject to change RSN.