in reply to return explicit undef - Best Practices?

Thanks for the suggestions, I think I've found a clear answer.

The rule I was looking at (PBP 9.12) is "returning failure". This isn't actually a case of returning failure, rather one of returning falsehood. So I'm going to go with JavaFan and explicitly return undef from the method.


- Boldra
  • Comment on Re: return explicit undef - Best Practices?

Replies are listed 'Best First'.
Re^2: return explicit undef - Best Practices?
by SuicideJunkie (Vicar) on Dec 09, 2008 at 14:17 UTC
    You could return 0 or '' for false instead, saving undef for actual errors.