Keep It Simple, Stupid | |
PerlMonks |
Re^3: Handling non-fatal method error strings without exceptions or globals?by Tanktalus (Canon) |
on Jan 19, 2005 at 16:24 UTC ( [id://423426]=note: print w/replies, xml ) | Need Help?? |
Just off the top of my head, I would do something like this:
Then you can use it like this:
With this, the caller wouldn't change much at all:
Hope that helps. (Completely untested ;->) Also, the way it is now, Result is not a class you can easily derive from ... I leave that as an excersise for other monks ;->
In Section
Seekers of Perl Wisdom
|
|