|more useful options|
Re^3: Surviving 'Illegal division by zero'by dragonchild (Archbishop)
|on Jun 23, 2004 at 14:36 UTC ( #369046=note: print w/replies, xml )||Need Help??|
This will make your code easier to understand. And, this is the way to "directly re-open the method definitions". In fact, it's safer to do it this way than it is to redefine it for the whole program. That kind of "action-at-a-distance" is the source of more maintenance nightmares than anything else.
Another way to look at it is that you can now parse, format, and handle anything to do with numbers in one place. If you want to change how you deal with numeric values, simply change the class. There's your global change, but it's nicely encapsulated.
A last concept to leave you with - if someone were to take your code and wrap it in something else, which is the politer way to handle things?
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
In Section Seekers of Perl Wisdom