On Thu, 22 Nov 2001, brian moseley wrote:

>  - exceptions: i heartily agree with using Exception::Class
> for exceptions, altho i submit the following suggestions:
>
>   1) it should be possible to decide whether or not the
> stack trace will be generated at the time the exception is
> created/thrown

Would you like to see this changed in Exception::Class?  I don't
particularly like the current way stacktrace generation is determined
anyway.

>   3) all apis guarantee that to the best of their ability,
> only exception objects are thrown, so that consumers of the
> apis don't have to defensively code with "if ($@ && ref $@
> && $@->isa('Exception::Class::Base'))" or whatever.

I have a module (not released to CPAN) that allow you to scope
$SIG{__DIE__} (and __WARN__) to a single package (though the package may
be spread over multiple files).  That might be useful as it provides a
safe way to assign to $SIG{__DIE__}.  The problem is that this affects
everything that assigns to $SIG{__DIE__}.  OTOH, this may not be a problem
since things that blithely assign to $SIG{__DIE__} probably aren't good
candidates for inclusion in P5EE.

Anyway, if people think this'd be useful I can try to figure out a decent
name for it and release it to CPAN.


-dave

/*==================
www.urth.org
We await the New Sun
==================*/

Reply via email to