]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
simplify IPC::Run check (same behavior)
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Mon, 6 Oct 2014 20:31:52 +0000 (16:31 -0400)
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Mon, 6 Oct 2014 20:31:52 +0000 (16:31 -0400)
t/relativity.t

index 300c6e61da966ed8378d58f5054561248553fb36..7e1e7049fdd67653f67dfbfe693c479a1e0a4333 100755 (executable)
@@ -2,21 +2,17 @@
 use warnings;
 use strict;
 
 use warnings;
 use strict;
 
-use Cwd qw(getcwd);
-use Errno qw(ENOENT);
-
-BEGIN {
-       if (!eval q{
+use Test::More;
+plan(skip_all => "IPC::Run not available")
+       unless eval q{
                use IPC::Run qw(run);
                1;
                use IPC::Run qw(run);
                1;
-       }) {
-               eval q{use Test::More skip_all => "IPC::Run not available"};
-       }
-       else {
-               eval q{use Test::More};
-       }
-       use_ok("IkiWiki");
-}
+       };
+
+use IkiWiki;
+
+use Cwd qw(getcwd);
+use Errno qw(ENOENT);
 
 my $PERL5LIB = 'blib/lib:blib/arch';
 my $pwd = getcwd();
 
 my $PERL5LIB = 'blib/lib:blib/arch';
 my $pwd = getcwd();