diff options
author | Steffen Müller <0mgwtfbbq@sneakemail.com> | 2006-02-05 12:26:00 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-02-05 21:22:03 +0000 |
commit | 84fc275b0c62bafad833d20cf8222d1372e9fd12 (patch) | |
tree | 62c33afeb5e90e0e887d3dc705c886d4019259b2 /lib | |
parent | c81225bc5ae0284701281258d95603e8bac4bf46 (diff) | |
download | perl-84fc275b0c62bafad833d20cf8222d1372e9fd12.tar.gz |
Documentation patch for overload
Message-ID: <43E5E0E9.1070707@sneakemail.com>
p4raw-id: //depot/perl@27096
Diffstat (limited to 'lib')
-rw-r--r-- | lib/overload.pm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/overload.pm b/lib/overload.pm index e11c30f5a2..943d8367cb 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -668,6 +668,24 @@ 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. This 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. The string conversion can also be used to +emulate concatenation, so we'll assume string conversion is defined. +It usually makes sense to explicitly overload all conversion +operations. + =head1 Losing overloading The restriction for the comparison operation is that even if, for example, |