|P is for Practical|
Using overload. Any complete (simple) examples?by BrowserUk (Pope)
|on Oct 07, 2003 at 19:50 UTC||Need Help??|
BrowserUk has asked for the
wisdom of the Perl Monks concerning the following question:
I've been playing around with overload for a while now, but always seem to encounter some problem.
It seems I'm always forced to overload '""' whether I really want to or not? And it seems to be called everytime the object is referenced even if it is being dereferenced?
I've never managed to get the numify '+0' overloading to do anything.
Anyone know of any fairly complete but reasonably simple examples of overloading? I looked at the Math::Big* modules, but they are so complex as to make it difficult to pick out the vagries of the overloading.
Examine what is said, not who speaks."Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail