in reply to signal handlers that play nice
You may want to check out Automatic stack tracebacks in warnings? on how I replace a warn handler and place a new warn handler in the "stack" by calling the old warn handler during my warn handler. It's one of the few times where using & to call a function is the right WTDI since I want to transparently pass along all parameters. Now that I'm looking at it, the if modifier probably should also be checking that $oldwarn is a CODE ref...
As for it being temporary - dragonchild's local suggestion is bang on. He just missed the part where you wanted to call the previous warn subroutine from within your own.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: signal handlers that play nice
by aquarium (Curate) on Oct 27, 2005 at 15:01 UTC | |
by esharris (Monk) on Oct 28, 2005 at 09:26 UTC | |
|
Re^2: signal handlers that play nice
by esharris (Monk) on Oct 28, 2005 at 09:16 UTC |