BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:
I have a class in which I am overloading stringification. However, it would be very useful if I could disable the overloading when I want to print stuff out for debugging purposes.
Currently, whenever I try to use print, warn, die etc., on $self, overload routes me to my stringify routine, which results in deep recursion if it that routine I happen to be try to get debug output from.
It also interferes with being able to use Abigail's Inside out objects technique.
Is there a smart dodge around this?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Temporarily disabling overloaded operations.
by broquaint (Abbot) on Sep 15, 2003 at 07:45 UTC | |
by BrowserUk (Patriarch) on Sep 15, 2003 at 08:32 UTC | |
Re: Temporarily disabling overloaded operations.
by BrowserUk (Patriarch) on Sep 15, 2003 at 06:45 UTC |