Permalink
Browse files

skip_all instead of BAIL_OUT so CPAN testers stop emailing me

  • Loading branch information...
1 parent 07dd425 commit 602e051ac72cf58e83fc2de5e28603a970f73ae8 @jrockway committed Jul 15, 2011
Showing with 9 additions and 5 deletions.
  1. +5 −2 t/00load.t
  2. +4 −3 t/lib/multilog.pm
View
@@ -2,9 +2,12 @@ use strict;
use warnings;
use Test::More;
-use ok 'AnyEvent::Multilog';
use t::lib::multilog qw(check_multilog);
-check_multilog 1;
+BEGIN {
+ check_multilog 1;
+}
+
+use ok 'AnyEvent::Multilog';
done_testing;
View
@@ -2,17 +2,18 @@ package t::lib::multilog;
use strict;
use warnings;
use Test::Builder;
-use 5.010;
+use File::Which qw(which);
use Sub::Exporter -setup => {
exports => [ qw/check_multilog/ ],
};
sub check_multilog {
my $talkative = shift;
my $tb = Test::Builder->new;
- my $multilog = $ENV{MULTILOG} || qx/which multilog/;
+ my $multilog = $ENV{MULTILOG} || which('multilog');
chomp $multilog;
- $tb->BAIL_OUT('no multilog found') unless -e -x $multilog;
+ $tb->plan(skip_all => 'no multilog found')
+ unless -e $multilog && -x $multilog;
$tb->diag("multilog found at $multilog") if $talkative;
return $multilog;
}

0 comments on commit 602e051

Please sign in to comment.