in reply to Re: using warn instead or print STDERR?
in thread using warn instead or print STDERR?

if only to someday take advantage of $SIG{__WARN__}:

I'm curious about this now since more than one person has brought this up. By the above statement do you mean: 1) You wish to one day write code to take advantage of signal capturing, or 2) You are waiting on something to be implemented?

TIA.
  • Comment on Re^2: using warn instead or print STDERR?

Replies are listed 'Best First'.
Re^3: using warn instead or print STDERR?
by repellent (Priest) on Feb 27, 2009 at 04:28 UTC
    More like 1. $SIG{__WARN__} allows me to decide what to do with my warnings at some later time, without needing to substitute every warn() call if I need things differently. See %SIG.
    # debugger, please slow down when you see keyword $SIG{__WARN__} = sub { $DB::single = $_[0] =~ /keyword/; warn(@_) }
      Very good. I took your use of the word 'someday' a bit too literally, instead of what you meant: sometime later in the running of your code.

      cheers.
      ryanc