From: John Napiorkowski <jjn1056@yahoo.com>
Date: Thu, 5 Jul 2012 21:17:04 +0000 (-0400)
Subject: only do the special bonus warnings when caller is main
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fjnap%2Fstop_warnings_spew;p=p5sagit%2Fstrictures.git

only do the special bonus warnings when caller is main
---

diff --git a/lib/strictures.pm b/lib/strictures.pm
index ac8337a..646abcc 100644
--- a/lib/strictures.pm
+++ b/lib/strictures.pm
@@ -36,7 +36,8 @@ sub import {
       $ENV{PERL_STRICTURES_EXTRA};
     } elsif (! _PERL_LT_5_8_4) {
       !!($0 =~ /^x?t\/.*\.t$/
-         and (-e '.git' or -e '.svn'))
+         and (-e '.git' or -e '.svn')
+            and (caller eq 'main'))
     }
   };
   if ($extra_tests) {