some cleanup
[gitmo/MooseX-Types-Path-Class.git] / t / perlcritic.t
index f7121c3..134bdfd 100644 (file)
@@ -1,10 +1,24 @@
 #!perl
 
+use warnings FATAL => 'all';
+use strict;
+use File::Spec;
 use Test::More;
-eval 'use Test::Perl::Critic (-severity => 3)';
+
+if ( not $ENV{TEST_AUTHOR} ) {
+    my $msg
+        = 'Author test.  Set $ENV{TEST_AUTHOR} to a true value to run.';
+    plan( skip_all => $msg );
+}
+
+eval { require Test::Perl::Critic; };
 if ($@) {
-    plan skip_all =>
-        "Test::Perl::Critic required for testing PBP compliance";
+    my $msg = 'Test::Perl::Critic required to criticise code';
+    plan( skip_all => $msg );
 }
 
+#my $rcfile = File::Spec->catfile( 't', 'perlcriticrc' );
+#Test::Perl::Critic->import( -profile => $rcfile );
+#all_critic_ok();
 Test::Perl::Critic::all_critic_ok();
+