On Tue, May 01, 2007 at 05:45:26PM -0400, Mark J. Reed wrote:
: Right. Something akin to P5's $SIG{__WARN__} and $SIG{__DIE__} would
: also work, but that never seemed to be quite the right way to do that,
: to me.
Never seemed quite right to me either. Er, except way back when it did... :/
In P6 such hooks are unnecessary for two reasons:
* Exception handlers are executed before the stack is unwound, so
a surrounding dynamic scope can get control at that point.
* Warnings are just exceptions that default to restarting, so the same
considerations apply.
And even if we did decide to install some kind of temporizable
global hook for such callbacks, I wouldn't put it into %SIG
these days. I'm not even sure signals belong in %SIG anymore.
Seems to me they should just be event objects coming in via some
feed to the event-driven underbelly of the program, assuming
we go ahead with a unified events/threads model as suggested by
http://www.seas.upenn.edu/~lipeng/homepage/unify.html.
Larry