On Wed, 10 Jul 2002, Perrin Harkins wrote:

> Matt Sergeant wrote:
> > On Wed, 10 Jul 2002, Fran Fabrizio wrote:
> >>Just to confirm, the end result of Matt's slide presentation was that
> >>Error.pm was good, and you should use it, but you should not use the
> >>try/catch syntax, or at the bare minimum only catch in your outermost
> >>handler.  Is that correct?  We were debating this just yesterday in our
> >>office.
> >
> > Actually my recommendation for this year's talk on exceptions is to just
> > use eval{}; if ($@) {}. It's a little more typing, but at the end of the
> > day closures created by subroutine prototypes are a really bad thing (tm).
>
> I believe he was asking if Error.pm is a good class to use for
> exceptions if you don't use the try/catch keywords.  I think it is.  It
> provides handy methods for storing attributes of the exception and
> getting stack traces, and it's easy to subclass.  You could also use
> Dave Rolsky's Exception::Class, which is pretty similar.

Ah, in that case I'm recommending Dave's stuff. It's more flexible and
doesn't use that irritating -param stuff. Though I have to do a little
more research to be certain some things are possible (like turning on
stack traces globally).

-- 
<!-- Matt -->
<:->Get a smart net</:->

Reply via email to