X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstrictures.pm;h=cfb6e53bd43dbda7e5d97d7e6ce75b1753066969;hb=dca7f1843c8109c592235fc100b4a6c60aaa87da;hp=68ca44c2a7583cb9f5844f662d512bb3efe71f8f;hpb=eae006ee3476346901d8edb6c73b1fed4a98c766;p=p5sagit%2Fstrictures.git diff --git a/lib/strictures.pm b/lib/strictures.pm index 68ca44c..cfb6e53 100644 --- a/lib/strictures.pm +++ b/lib/strictures.pm @@ -3,7 +3,7 @@ package strictures; use strict; use warnings FATAL => 'all'; -our $VERSION = '1.000000'; # 1.0.0 +our $VERSION = '1.001000'; # 1.1.0 sub VERSION { for ($_[1]) { @@ -20,7 +20,8 @@ sub import { if (exists $ENV{PERL_STRICTURES_EXTRA}) { $ENV{PERL_STRICTURES_EXTRA} } else { - !!($0 =~ /^x?t\/.*(?:load|compile|coverage).*\.t$/) + !!($0 =~ /^x?t\/.*(?:load|compile|coverage|use_ok).*\.t$/ + and (-e '.git' or -e '.svn')) } }; if ($do_indirect) { @@ -50,10 +51,11 @@ is equivalent to except when called from a file where $0 matches: - /^x?t\/.*(?:load|compile|coverage).*\.t$/ + /^x?t\/.*(?:load|compile|coverage|use_ok).*\.t$/ -or when the PERL_STRICTURES_EXTRA environment variable is set, in which -case +and when either '.git' or '.svn' is present in the current directory (with +the intention of only forcing extra tests on the author side) - or when the +PERL_STRICTURES_EXTRA environment variable is set, in which case use strictures 1;