I'm personally a fan of $object->errstr, with methods returning 0 on failure. You will either agree or you won't.
Almost the same here. I use error, not errstr (try pronouncing errstr). And I return nothingness on failure.
That's a plain return;. It has the benefit of being undef in scalar context, but an empty list in list context.
Juerd
- http://juerd.nl/
- spamcollector_perlmonks@juerd.nl (do not use).
In reply to Re: Re: How to say 'oops' in OOPs?
by Juerd
in thread How to say 'oops' in OOPs?
by Willard B. Trophy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |