From: Mike S. <m...@pe...> - 2006-12-11 15:28:11
|
On Tue, 5 Dec 2006, J. David Blackstone wrote: > Turns out there's an even easier way to do that. $^S can be > checked to see if code is in an eval. Thinking through this > yesterday afternoon I finally decided this wasn't a Log4perl > issue, but a general Perl issue, because really I think you'd > almost never want those SIG handlers to fire when you're in > an eval, trying to trap things before they become warnings > and errors. So I asked at use Perl; , and somebody pointed me > to that variable. Nice! > Since I wound up not using those handlers yesterday, it was a > little too late, but I do still have a module called by this > program and by others, and I'll have to either instrument it > as I did the main program, or go back and use the handlers. > (I'm thinking about doing both, for good measure.) Yeah, always a good idea :). > Looks to me like the FAQ might want to change the text of > those signal handlers to include a check of $^S to decide > whether to log or not. And somebody might like to package it > all up in a module, which is what I was trying to do > yesterday. :) Added it in 1.09, thanks! -- Mike Mike Schilli m...@pe... |