use Test::Requires in tests
[gitmo/Moose.git] / t / 200_examples / 002_example_Moose_POOP.t
index 81b6e5d..9db4ee2 100644 (file)
@@ -5,12 +5,10 @@ use warnings;
 
 use Test::More;
 
-BEGIN {
-    eval "use DBM::Deep 1.0003;";
-    plan skip_all => "DBM::Deep 1.0003 (or greater) is required for this test" if $@;
-    eval "use DateTime::Format::MySQL;";
-    plan skip_all => "DateTime::Format::MySQL is required for this test" if $@;
-}
+use Test::Requires {
+    'DBM::Deep' => '1.0003', # skip all if not installed
+    'DateTime::Format::MySQL' => '0.01',
+};
 
 use Test::Exception;