in reply to Re: SIG{__WARN__}, Storable, and Log::Agent...
in thread SIG{__DIE__}, Storable, and Log::Agent...
When perlvar says "Do not use this to ..., or as a bizarre substitute for overriding CORE::GLOBAL::die()", what exactly do they mean? I though that the entire purpose of $SIG{__DIE__} was exactly for overriding the global die() functionality.
Perhaps my question should permute into this:
I have a ton of code, much of it in modules, which in turn use other modules I've written, which in turn also use some 3rd party and/or core modules. When I execute the top level scripts that drag all of this in, I would like to enforce that all die()s and warn()s that happen, regardless of the module they occur in, call my special die/warn handlers to handle all of the error output in a consistent fashion.
Since there are many top-level scripts, I would prefer to wrap the die/warn-handling code into another module, say named "MyProject::ErrorHandler", which I include in the top level scripts and/or the various modules I have control over. How does one go about accomplishing this correctly, without screwing up die()'s that occur in evals, which some modules (even my own) depend on.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: SIG{__WARN__}, Storable, and Log::Agent...
by ph713 (Pilgrim) on May 06, 2005 at 21:23 UTC |