esharris has asked for the wisdom of the Perl Monks concerning the following question:
But suppose another module also changes the behavior of warn by assigning its own sub ref to $SIG{__WARN__}. Then, one assignment overwrites the other. Wouldn't it be friendlier to save the current warn subroutine and call it within your warn subroutine? And instead of just setting the warning back to the default behavior, why not put the preceding warn routine back? Has anyone tried to do this? If so, do you have an elegant solution?$SIG{__WARN__}='DEFAULT';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: signal handlers that play nice
by dragonchild (Archbishop) on Oct 27, 2005 at 13:40 UTC | |
by esharris (Monk) on Oct 28, 2005 at 09:12 UTC | |
|
Re: signal handlers that play nice
by Tanktalus (Canon) on Oct 27, 2005 at 14:47 UTC | |
by aquarium (Curate) on Oct 27, 2005 at 15:01 UTC | |
by esharris (Monk) on Oct 28, 2005 at 09:26 UTC | |
by esharris (Monk) on Oct 28, 2005 at 09:16 UTC |