use AutoPrereqs, making sure to skip optional plugins
[p5sagit/Devel-REPL.git] / t / load_plugins.t
index 891a72c..40b11c7 100755 (executable)
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 
 use Test::More;
-use Test::Warnings;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
 
 use_ok('Devel::REPL');
 
@@ -59,7 +59,8 @@ sub test_load_plugin {
         eval "use Devel::REPL::Plugin::$plugin_name; 1"
             or skip "could not eval plugin $plugin_name", 1;
 
-        ok(eval { $repl->load_plugin($plugin_name); 1 }, $test_name);
+        ok(eval { $repl->load_plugin($plugin_name); 1 }, $test_name)
+            or diag $@;
     }
 }