[Bps-public-commit] r10873 - in Shipwright/trunk: t/hello

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Feb 18 12:22:45 EST 2008


Author: sunnavy
Date: Mon Feb 18 12:22:43 2008
New Revision: 10873

Modified:
   Shipwright/trunk/META.yml
   Shipwright/trunk/Makefile.PL
   Shipwright/trunk/t/hello/hello.t
   Shipwright/trunk/t/hello/svn.t

Log:
better way to find if a command exists

Modified: Shipwright/trunk/META.yml
==============================================================================
--- Shipwright/trunk/META.yml	(original)
+++ Shipwright/trunk/META.yml	Mon Feb 18 12:22:43 2008
@@ -3,6 +3,7 @@
 author: 
   - sunnavy  C<< <sunnavy at bestpractical.com> >>
 build_requires: 
+  IPC::Cmd: 0
   Module::Build: 0
 distribution_type: module
 generated_by: Module::Install version 0.68

Modified: Shipwright/trunk/Makefile.PL
==============================================================================
--- Shipwright/trunk/Makefile.PL	(original)
+++ Shipwright/trunk/Makefile.PL	Mon Feb 18 12:22:43 2008
@@ -4,6 +4,7 @@
 name 'Shipwright';
 all_from 'lib/Shipwright.pm';
 build_requires 'Module::Build' => 0;
+build_requires 'IPC::Cmd' => 0;
 requires 'App::CLI' => 0;
 requires 'Algorithm::Dependency::Ordered' => 0;
 requires 'Algorithm::Dependency::Source::HoA' => 0;

Modified: Shipwright/trunk/t/hello/hello.t
==============================================================================
--- Shipwright/trunk/t/hello/hello.t	(original)
+++ Shipwright/trunk/t/hello/hello.t	Mon Feb 18 12:22:43 2008
@@ -7,11 +7,12 @@
 use File::Copy::Recursive qw/dircopy/;
 use File::Spec;
 use Cwd;
+use IPC::Cmd qw/can_run/;
 
 use Test::More tests => 40;
 SKIP: {
-    skip "can't find svk in PATH", 40,
-      unless `whereis svk`;
+    skip "can't find svk or svnadmin in PATH", 40,
+      unless can_run('svk') && can_run('svnadmin');
 
     my $cwd  = getcwd;
 

Modified: Shipwright/trunk/t/hello/svn.t
==============================================================================
--- Shipwright/trunk/t/hello/svn.t	(original)
+++ Shipwright/trunk/t/hello/svn.t	Mon Feb 18 12:22:43 2008
@@ -8,10 +8,12 @@
 use File::Spec;
 use Cwd;
 use Test::More tests => 17;
+use IPC::Cmd qw/can_run/;
 
 SKIP: {
-    skip "can't find svn in PATH", 17,
-      unless `whereis svn` && `whereis svnadmin`;
+    skip "can't find svn or svnadmin in PATH", 17,
+      unless can_run('svn') && can_run('svnadmin');
+
     my $cwd = getcwd;
 
     my $repo = 'file:///tmp/shipwright_svn/hello';



More information about the Bps-public-commit mailing list