some cleanup
Todd Hepler [Wed, 9 Jul 2008 19:19:38 +0000 (19:19 +0000)]
Makefile.PL
lib/MooseX/Types/Path/Class.pm
t/02.getopt.t
t/perlcritic.t
t/pod-coverage.t

index dd89d8d..cd27b24 100644 (file)
@@ -13,16 +13,10 @@ requires 'Moose'          => '0.39';
 requires 'MooseX::Types'  => '0.04';
 requires 'Path::Class'    => '0.16';
 
-# optional
-#feature 'MooseX::Getopt',
-#    -default         => 0,
-#    'MooseX::Getopt' => '0.05';
-#optional 'MooseX::Getopt' => 0.05;
-
 # things the tests need
 build_requires 'Test::More' => '0.62';
 
-auto_provides;
+#auto_provides;
 
 #auto_install;
 
index 021d873..e47b779 100644 (file)
@@ -33,9 +33,8 @@ for my $type ( 'Path::Class::File', File ) {
 }
 
 # optionally add Getopt option type
-use English qw(-no_match_vars);
 eval { require MooseX::Getopt; };
-if ( !$EVAL_ERROR ) {
+if ( !$@ ) {
     MooseX::Getopt::OptionTypeMap->add_option_type_to_map( $_, '=s', )
         for ( 'Path::Class::Dir', 'Path::Class::File', Dir, File, );
 }
@@ -87,10 +86,6 @@ L<Path::Class::File> objects.  If you have L<MooseX::Getopt> installed,
 the Getopt option type ("=s") will be added for both
 L<Path::Class::Dir> and L<Path::Class::File>.
 
-This is just meant to be a central place for these constructs, so you
-don't have to worry about whether they've been created or not, and
-you're not tempted to copy them into yet another class (like I was).
-
 
 =head1 EXPORTS
 
index 48b4ad6..f3feae5 100644 (file)
@@ -1,10 +1,9 @@
 
 use warnings FATAL => 'all';
 use strict;
-use English qw(-no_match_vars);
 
 eval { require MooseX::Getopt; };
-if ($EVAL_ERROR) {
+if ($@) {
     plan( skip_all => 'MooseX::Getopt required for this test' );
 }
 
index afde8f4..134bdfd 100644 (file)
@@ -4,7 +4,6 @@ use warnings FATAL => 'all';
 use strict;
 use File::Spec;
 use Test::More;
-use English qw(-no_match_vars);
 
 if ( not $ENV{TEST_AUTHOR} ) {
     my $msg
@@ -13,8 +12,7 @@ if ( not $ENV{TEST_AUTHOR} ) {
 }
 
 eval { require Test::Perl::Critic; };
-
-if ($EVAL_ERROR) {
+if ($@) {
     my $msg = 'Test::Perl::Critic required to criticise code';
     plan( skip_all => $msg );
 }
index a641424..20381d2 100644 (file)
@@ -4,8 +4,7 @@ use warnings FATAL => 'all';
 use strict;
 use Test::More;
 eval "use Test::Pod::Coverage 1.04";
-if ($@) {
-    plan skip_all =>
-        "Test::Pod::Coverage 1.04 required for testing POD coverage";
-}
+plan skip_all =>
+    "Test::Pod::Coverage 1.04 required for testing POD coverage"
+    if ($@);
 all_pod_coverage_ok();