From: | "Gareth Kirwan" <gbjk [...] thermeoneurope.com> |
To: | <eek+cpan [...] eekeek.org>, <bug-POE-Exceptions [...] rt.cpan.org>, <sungo [...] cpan.org> |
Subject: | POE::Exceptions tests and sig_handled |
Date: | Mon, 15 Sep 2003 15:33:33 +0100 |
When using POE::Exceptions I noticed that the DIE handler was acting as if
it didn't return 1.
After checking I noted that now I should be using $_[KERNEL]->sig_handler.
I was directed to look at the tests, and at that point I realised what the
problem seems to be.
abdigation.t (
http://search.cpan.org/src/SUNGO/POE-Exceptions-0.02/t/abdigation.t )
doesn't test a signal handler returning that it handled the signal with
sig_handled.
It's just there to test that if a handler doesn't return handled then the
eval picks it up.
signal_handler.t (
http://search.cpan.org/src/SUNGO/POE-Exceptions-0.02/t/signal_handler.t )
doesn't check that the unhandled exception it's catching with the eval is
the second die:
die "this die will be handled, too";
and not the first one:
die "this die should be handled";
I added a check at the bottom and $@ is reporting an unhandled exception for
the first die, which should have been reported as handled by the sig_handled
at the end of &death_handled.
In other words:
1) On my system it seems that $_[KERNEL]->sig_handled() isn't stopping the
programme from bailing after than handler has been run ( and it is run ).
2) The tests don't catch this eventuallity.
System is: Linux 2.4.18-14 with Perl 5.8.0.
POE works okay on it's own so far.
I hope the information I've given is correct.
Thanks for your time.
Gareth Kirwan
Programming & Development,
Thermeon Europe Ltd,
gbjk@thermeoneurope.com
Tel: +44 (0) 1293 864 303
Thermeon Europe e-Card: gbjk