[Bps-public-commit] r13332 - in Shipwright/trunk: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Jun 16 15:26:55 EDT 2008


Author: sunnavy
Date: Mon Jun 16 15:26:20 2008
New Revision: 13332

Modified:
   Shipwright/trunk/   (props changed)
   Shipwright/trunk/lib/Shipwright/Util.pm

Log:
 r13459 at sunnavys-mb:  sunnavy | 2008-06-17 03:18:44 +0800
 let SW::Util::run return be list sensitive: only return $out in scalar context


Modified: Shipwright/trunk/lib/Shipwright/Util.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Util.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Util.pm	Mon Jun 16 15:26:20 2008
@@ -70,7 +70,7 @@
         die "something wrong when execute @$cmd: $?" unless $ignore_failure;
     }
 
-    return ( $out, $err );
+    return wantarray ? ( $out, $err ) : $out;
 
 }
 
@@ -106,7 +106,7 @@
     $SHARE_ROOT ||=
       eval { File::Spec->rel2abs( File::ShareDir::module_dir('Shipwright') ) };
 
-    unless ( $SHARE_ROOT && -d $SHARE_ROOT ) {
+    unless ( $SHARE_ROOT ) {
 
         # XXX TODO: This is a bloody hack
         # Module::Install::Share and File::ShareDir don't play nicely



More information about the Bps-public-commit mailing list