Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

skip_all instead of BAIL_OUT so CPAN testers stop emailing me

  • Loading branch information...
commit 602e051ac72cf58e83fc2de5e28603a970f73ae8 1 parent 07dd425
Jonathan Rockway authored July 15, 2011
7  t/00load.t
@@ -2,9 +2,12 @@ use strict;
2 2
 use warnings;
3 3
 use Test::More;
4 4
 
5  
-use ok 'AnyEvent::Multilog';
6 5
 use t::lib::multilog qw(check_multilog);
7 6
 
8  
-check_multilog 1;
  7
+BEGIN {
  8
+    check_multilog 1;
  9
+}
  10
+
  11
+use ok 'AnyEvent::Multilog';
9 12
 
10 13
 done_testing;
7  t/lib/multilog.pm
@@ -2,7 +2,7 @@ package t::lib::multilog;
2 2
 use strict;
3 3
 use warnings;
4 4
 use Test::Builder;
5  
-use 5.010;
  5
+use File::Which qw(which);
6 6
 use Sub::Exporter -setup => {
7 7
     exports => [ qw/check_multilog/ ],
8 8
 };
@@ -10,9 +10,10 @@ use Sub::Exporter -setup => {
10 10
 sub check_multilog {
11 11
     my $talkative = shift;
12 12
     my $tb = Test::Builder->new;
13  
-    my $multilog = $ENV{MULTILOG} || qx/which multilog/;
  13
+    my $multilog = $ENV{MULTILOG} || which('multilog');
14 14
     chomp $multilog;
15  
-    $tb->BAIL_OUT('no multilog found') unless -e -x $multilog;
  15
+    $tb->plan(skip_all => 'no multilog found')
  16
+        unless -e $multilog && -x $multilog;
16 17
     $tb->diag("multilog found at $multilog") if $talkative;
17 18
     return $multilog;
18 19
 }

0 notes on commit 602e051

Please sign in to comment.
Something went wrong with that request. Please try again.