in reply to Re: Re: trapping -w warnings
in thread trapping -w warnings
I liked this enough that I bookmarked this in my delicious collection -- helped me debug a nasty problem.
I did things slightly differently though -- more localized, I think.
cheers.{ local $SIG{__WARN__} = sub { my @warnings = @_; foreach my $warning (@warnings) { print "got a warning: $warning\n"; } }; eval {'' =~ /$re/ }; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: trapping -w warnings
by bart (Canon) on Nov 24, 2006 at 18:47 UTC | |
Re^4: trapping -w warnings
by tphyahoo (Vicar) on Feb 20, 2007 at 15:28 UTC |
In Section
Seekers of Perl Wisdom