The first thing that struck me thought was "How can AUTOLOAD determine boolean context?".
AUTOLOAD doesn't have to. You overload bool and use it to set some internal flag in the object to say it's been evaluated in a boolean context. Then in DESTROY you throw an exception if the flag has not been set.
In reply to Re^3: chaining method calls (smart error object)
by adrianh
in thread chaining method calls
by perrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |