On 1/30/07, Joshua ben Jore <[EMAIL PROTECTED]> wrote:
Interestingly, this has caused me to wonder how well Test::Exception
handles the corner cases where $@ is clobbered during the scope ending
of eval{} and related. I've just filed a bug against it at
http://rt.cpan.org/Ticket/Display.html?id=24678. The overall moral is
when using eval{} you have to test the return value as well as [EMAIL 
PROTECTED] $@
can be empty under errors which is kind of a bummer.

This might be better as a perlbug than a bug in Test::Exception as
eval in a DESTROY subroutine will clobber $@ at the end of scope in an
ordinary eval block, too.

Localizing $@ in DESTROY does the trick and perhaps Perl should do
that automatically.

David

Reply via email to