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';
In reply to signal handlers that play nice by esharris
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |