Exception Handling

Matt Sergeant msergeant at messagelabs.com
Fri Jul 13 17:37:59 BST 2007


On 13-Jul-07, at 8:10 AM, David Cantrell wrote:

> No, really?  Your grandmother is over there --> wanting to know how to
> suck eggs.

You asked, not sure why you're trying to make me look dumb.

> The point is that both 0 and undef are false, and so if the user isn't
> careful about checking their return values that could lead to errors.

Or you look at it the other way, that you're simplifying the API  
(otherwise you'd have to return some sort of constant and the user  
would have to do a compare). Sort of like DBI's use of 0E0 for true- 
but-zero when returning the number of rows available from $db->execute.

Matt.

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


More information about the london.pm mailing list