in reply to Re: When to use sigtrap, when to assign to %SIG?
in thread When to use sigtrap, when to assign to %SIG?

You use the sigtrap pragma when you need the extra mojo it supplies. In absence of any code, any further answer would be pure speculation.

What mojo? Yes, do speculate

"Is local $SIG{INT} important?" -- that would depend on how it's used in the code that you haven't shown us. In absence of any code, any further answer would be pure speculation.

Is using local $SIG... important?

  • Comment on Re^2: When to use sigtrap, when to assign to %SIG?

Replies are listed 'Best First'.
Re^3: When to use sigtrap, when to assign to %SIG?
by JavaFan (Canon) on Jan 02, 2012 at 10:49 UTC
    Is using local $SIG... important?
    Sometimes it is. Usually, it doesn't matter as you want the same handler for the entire run of your program. Most of the time though, it doesn't hurt to have it localized.

    As a rule of thumb, I always localize my sig handlers, unless there's a good reason not to.