[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Python or Perl for a Debian maintainance project?

Hi, Julian Mehnle wrote:

> That's true, but there's no reason not to use exceptions in Perl.  They're
> even built-in, although you eccentrically (or shall I say, exceptionally)
> raise them with `die`, and catch them with `eval {}` -- and yes, that *is*
> efficient.  As syntactic sugar, you may want to use the CPAN module
> "Error", though.

I thought so once, too. The problem is that this is not a standard Perl
idiom, therefore it's not all that well tested, and lots of little niggly
difficult-to-reproduce bugs (reference counting, error reporting, et al.),
still lurk in the corners when you do any kind of non-local exit.

And yes, I have Perl bugs open about that.

NB, a second problem is that eval{} catches everything. Usually,
that's not what you want to do.

Matthias Urlichs

Reply to: