I've changed the way CATCH_EXCEPTIONS works with $SIG{__DIE__}.
I broke (and then fixed) one regression test in the process.
If this is a feature you use, please try out the change before
it's released.

Thanks!

https://github.com/rcaputo/poe/commit/52487325a316b2bcc945f0a1f344556b58760ef3

commit 52487325a316b2bcc945f0a1f344556b58760ef3
Author: Rocco Caputo <rcap...@cpan.org>
Date:   Thu Sep 5 18:52:13 2013 -0400

    !!! CATCH_EXCEPTIONS revamp.

    May be slightly backwards incompatible.  I expect more good to come
    from it than harm.

    POE should hide error messages less often.  Its usage of eval() and
    propagation of exceptions have been simplified somewhat.

    !!! This change reverses POE's stance on user-defined $SIG{__DIE__}
    handlers.  Now they are honored inside event handlers.  Code that does
    this is expected to know what it's doing.  Perl's global special
    variables, including %SIG, have spooky action at a distance.

    Modifying $SIG{__DIE__} locally shouldn't cause any problems.  The
    original value will be restored at the end of the local scope.

    I changed this because reasons:

    1. Silent side effects suck.  Previously, POE would silently overrule
    global changes to $SIG{__DIE__}.  This change makes things a little
    more comprehensible.

    2. $SIG{__DIE__} handlers are very useful for logging and debugging.
    Setting them should be permissible.

    3. If CATCH_EXCEPTIONS is on, and $SIG{__DIE__} is redefined in an
    event handler, the programmer is told about the potential side
    effects.  This is an experimental warning and is subject to change
    more than most things.

    4. Error messages were being hidden at work, and it was confounding
    development.

-- 
Rocco Caputo <rcap...@pobox.com>

Reply via email to