From: Matt S Trout <mst@shadowcat.co.uk>
Date: Wed, 16 Feb 2011 00:42:00 +0000 (+0000)
Subject: add bareword::filehandles and multidimensional
X-Git-Tag: release_1.002000~3
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=653f4377298cd61f33731000401bb5511faf71e3;p=p5sagit%2Fstrictures.git

add bareword::filehandles and multidimensional
---

diff --git a/Changes b/Changes
index 3f03aa8..b75d2ae 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,4 @@
+  - add multidimensional and bareword::filehandles in author mode
 1.1.1 Dec 05 2010
   - disable uninitialized warnings before calling ->SUPER::VERSION
 1.1.0 Nov 22 2010
diff --git a/lib/strictures.pm b/lib/strictures.pm
index 976ff13..132b92b 100644
--- a/lib/strictures.pm
+++ b/lib/strictures.pm
@@ -22,7 +22,7 @@ sub VERSION {
 sub import {
   strict->import;
   warnings->import(FATAL => 'all');
-  my $do_indirect = do {
+  my $extra_tests = do {
     if (exists $ENV{PERL_STRICTURES_EXTRA}) {
       $ENV{PERL_STRICTURES_EXTRA}
     } else {
@@ -30,15 +30,26 @@ sub import {
          and (-e '.git' or -e '.svn'))
     }
   };
-  if ($do_indirect) {
-    if (eval { require indirect; 1 }) {
+  if ($extra_tests) {
+    if (eval {
+          require indirect;
+          require multidimensional;
+          require bareword::filehandles;
+          1
+        }) {
       indirect->unimport(':fatal');
+      multidimensional->unimport;
+      bareword::filehandles->unimport;
     } else {
-      die "strictures.pm extra testing active but couldn't load indirect.pm
+      die "strictures.pm extra testing active but couldn't load modules.
 Extra testing is auto-enabled in checkouts only, so if you're the author
-of a strictures using module you should 'cpan indirect' but the module
-is not required by your users.
-Error loading indirect.pm was: $@";
+of a strictures using module you need to run:
+
+  cpan indirect multidimensional bareword::filehandles
+
+but these modules are not required by your users.
+
+Error loading modules was: $@";
     }
   }
 }
@@ -74,13 +85,15 @@ is equivalent to
   use strict;
   use warnings FATAL => 'all';
   no indirect 'fatal';
+  no multidimensional;
+  no bareword::filehandles;
 
 Note that _EXTRA may at some point add even more tests, with only a minor
 version increase, but any changes to the effect of 'use strictures' in
 normal mode will involve a major version bump.
 
-Be aware: THIS MEANS INDIRECT IS REQUIRED FOR AUTHORS OF STRICTURES USING
-CODE - but not by end users thereof.
+Be aware: THIS MEANS THE EXTRA TEST MODULES ARE REQUIRED FOR AUTHORS OF
+STRICTURES USING CODE - but not by end users thereof.
 
 =head1 DESCRIPTION