Exception Handling

David Cantrell david at cantrell.org.uk
Thu Jul 12 16:55:21 BST 2007

On Wed, Jul 11, 2007 at 05:01:02AM -0700, Ovid wrote:

> And if the end-user forgets to check a return value, or checks it incorrectly (there are plenty of subtle ways this can happen), this returning false fails.  I only want to see code returning false if the failure is safe to ignore.  Otherwise, I want a proper exception.

With that in mind, what do you think of my practice in Number::Phone et
al of returning 1 to mean "yes" (eg yes, this is a mobile number), 0 to
mean "no" (no, it's not a mobile number) and undef for "dunno"?

David Cantrell | top google result for "internet beard fetish club"

    Fashion label: n: a liferaft for personalities
    which lack intrinsic buoyancy

More information about the london.pm mailing list