On Dec 15, 2004, at 9:42 AM, David E. Wheeler wrote:

- Then define check() to be { self->attempt_transition() || croak ... }
But a better name than check() would also be good.

Ah, I guess you like the idea of attempt_transition() returning undef on failure but not die'ing, eh? I guess it'd be easy enough to support both approaches, as you suggest.

How about try_switch()? Much shorter, but with the same meaning. And it does operate rather like Switch.pm -- it essentially executes a short-circuiting switch statement.


I think I like it. Then I could have switch() be the one that croaks.

Thoughts?

Cheers,

David

Reply via email to