From: Steffen Müller <0mgwtfbbq@sneakemail.com> Date: Mon, 6 Feb 2006 10:58:44 +0000 (+0100) Subject: Re: [PATCH] Documentation patch for overload X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=299476e067e522a02a8665fc1b3cd7f58f408de0;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Documentation patch for overload Message-ID: <43E71DD4.5010108@sneakemail.com> p4raw-id: //depot/perl@27120 --- diff --git a/lib/overload.pm b/lib/overload.pm index 943d836..d511f2c 100644 --- a/lib/overload.pm +++ b/lib/overload.pm @@ -672,8 +672,9 @@ value is a scalar and not a reference. 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: +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 above. The minimal set is: + - * / % ** << >> x <=> cmp @@ -681,10 +682,8 @@ set is: 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. +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