use strict;
use warnings;
+use lib 't/lib';
+
+use Test::More tests => 1;
+
my %prereqs = (
- 'Test::More' => '0',
- 'Moose' => '0.80',
- 'Class::MOP' => '0.85',
+ 'Moose' => '0.85',
+ 'Class::MOP' => '0.88',
);
my @missing;
}
if ( $mod->VERSION < $prereqs{$mod} ) {
- push @missing, "$mod must be version $prereqs{$mod} or greater";
+ push @missing, "$mod must be version $prereqs{$mod} or greater (you have " . $mod->VERSION . ")";
}
}
if (@missing) {
- warn "\n# ***********************************************************\n";
- warn "#\n";
- warn "# Found the following prereq problems ...\n";
- warn "# $_\n" for @missing;
- warn "#\n";
- warn "# ***********************************************************\n";
-
- exit 255;
+ diag "\n***********************************************************\n";
+ diag "\n";
+ diag " Found the following prereq problems ...\n";
+ diag " $_\n" for @missing;
+ diag "\n";
+ diag " ***********************************************************\n";
}
-Test::More->import;
-
-plan( tests => 1 );
-ok( 'Looks like you have all the prereqs' );
-
+ok( ! @missing, 'Checking for prereqs' );