Think about Loose Coupling | |
PerlMonks |
Re: $! context behaviorby miyagawa (Chaplain) |
on Aug 01, 2001 at 13:51 UTC ( [id://101337]=note: print w/replies, xml ) | Need Help?? |
use overload. Here is a class that returns "foo" in a string context, and retutns 1 in numeric context.
Interesting examples of modules using overload is y2k and Dunce::time, that magically fixes y2k or 10-digit time problem.
--
In Section
Seekers of Perl Wisdom
|
|