[Bps-public-commit] r12212 - Shipwright/trunk/lib/Shipwright

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sat May 10 08:10:25 EDT 2008


Author: sunnavy
Date: Sat May 10 08:10:25 2008
New Revision: 12212

Modified:
   Shipwright/trunk/lib/Shipwright/Script.pm

Log:
shipwright without any commands should default to --help

Modified: Shipwright/trunk/lib/Shipwright/Script.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script.pm	Sat May 10 08:10:25 2008
@@ -16,9 +16,13 @@
 
 sub prepare {
     my $self = shift;
-    if ( $ARGV[0] && $ARGV[0] =~ /--?h(elp)?/i ) {
+    $ARGV[0] = 'help' unless @ARGV;
+
+    if ( $ARGV[0] =~ /--?h(elp)?/i ) {
         $ARGV[0] = 'help';
     }
+
+
     return $self->SUPER::prepare(@_);
 }
 



More information about the Bps-public-commit mailing list