in reply to doubious about redefine $SIG{__WARN__}

The __WARN__ handler looks ok to me. It's pretty harmless to redirect warnings to STDOUT and count them.

The __DIE__ handler is incorrect since you're not re-throwing the exception and you're not examining $^S to determine if the die() is happening in an eval block. Some modules use die() as an internal exception mechanism and you won't want to treat those non-fatal deaths as errors.

-sam

  • Comment on Re: doubious about redefine $SIG{__WARN__}

Replies are listed 'Best First'.
Re^2: doubious about redefine $SIG{__WARN__}
by Discipulus (Canon) on May 13, 2008 at 11:05 UTC
    thnk sam, i'm investigating on this $^S now..
    UPDATE: I've asked also node_id=686241