You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2006/12/06 14:09:00 UTC

svn commit: r483064 - in /spamassassin/trunk: spamassassin.raw spamd/spamd.raw

Author: jm
Date: Wed Dec  6 05:08:59 2006
New Revision: 483064

URL: http://svn.apache.org/viewvc?view=rev&rev=483064
Log:
oops.  t/db_awl_path.t was failing due to this, since eval { } scope is used extensively to catch stuff that needs to be cleaned up, causing the warn messages to be hidden since it was in an eval scope

Modified:
    spamassassin/trunk/spamassassin.raw
    spamassassin/trunk/spamd/spamd.raw

Modified: spamassassin/trunk/spamassassin.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamassassin.raw?view=diff&rev=483064&r1=483063&r2=483064
==============================================================================
--- spamassassin/trunk/spamassassin.raw (original)
+++ spamassassin/trunk/spamassassin.raw Wed Dec  6 05:08:59 2006
@@ -82,11 +82,12 @@
 use Mail::SpamAssassin::Logger qw(log_message);
 
 BEGIN {
-  # redirect __WARN__ and __DIE__, but NOT until after the
+  # redirect __WARN__, but NOT until after the
   # Mail::SpamAssassin::Logger class has been parsed.
+  # do not trap warnings here based on eval scope; evals are very
+  # common throughout.  die()s can be trapped in future though.
   $SIG{__WARN__} = sub {
-    # see http://use.perl.org/comments.pl?mode=flat&sid=33872 for $^S
-    log_message("warn", $_[0]) unless $^S;
+    log_message("warn", $_[0]);
   };
 };
 

Modified: spamassassin/trunk/spamd/spamd.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/spamd/spamd.raw?view=diff&rev=483064&r1=483063&r2=483064
==============================================================================
--- spamassassin/trunk/spamd/spamd.raw (original)
+++ spamassassin/trunk/spamd/spamd.raw Wed Dec  6 05:08:59 2006
@@ -111,11 +111,13 @@
   eval { require Time::HiRes };
   Time::HiRes->import(qw(time)) unless $@;
   # redirect __WARN__ and __DIE__
+  # do not trap warnings here based on eval scope; evals are very
+  # common throughout.  die()s can be trapped though.
   $SIG{__WARN__} = sub {
-    # see http://use.perl.org/comments.pl?mode=flat&sid=33872 for $^S
-    log_message("warn", $_[0]) unless $^S;
+    log_message("warn", $_[0]);
   };
   $SIG{__DIE__} = sub {
+    # see http://use.perl.org/comments.pl?mode=flat&sid=33872 for $^S
     log_message("error", $_[0]) unless $^S;
   };
 }