[Bps-public-commit] r13519 - in Shipwright/trunk: lib/Shipwright/Script

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sat Jun 21 03:04:58 EDT 2008


Author: sunnavy
Date: Sat Jun 21 03:04:58 2008
New Revision: 13519

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

Log:
 r13605 at sunnavys-mb:  sunnavy | 2008-06-21 01:21:17 +0800
 text improved


Modified: Shipwright/trunk/lib/Shipwright/Script/Flags.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Flags.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Flags.pm	Sat Jun 21 03:04:58 2008
@@ -48,10 +48,20 @@
     unless ( defined $self->add || defined $self->delete || defined $self->set )
     {
         if ( $self->mandatary ) {
-            print join( ', ', @{ $flags->{__mandatary}{$name} || [] } ), "\n";
+            if ( $flags->{__mandatary}{$name} ) {
+                print join( ', ', @{ $flags->{__mandatary}{$name} } ), "\n";
+            }
+            else {
+                print "$name is not a valid mandatary name\n";
+            }
         }
         else {
-            print join( ', ', @{ $flags->{$name} || [] } ), "\n";
+            if ( $flags->{$name} ) {
+                print join( ', ', @{ $flags->{$name} } ), "\n";
+            }
+            else {
+                print "$name is not set flags\n";
+            }
         }
         return;
     }
@@ -89,11 +99,11 @@
 
     if ( $self->mandatary ) {
         print "set mandatary flags with success, current flags for $name is "
-          . join( ',', @{ $flags->{__mandatary}{$name} } ) . "\n";
+          . join( ', ', @{ $flags->{__mandatary}{$name} } ) . "\n";
     }
     else {
         print "set flags with success, current flags for $name is "
-          . join( ',', @{ $flags->{$name} } ) . "\n";
+          . join( ', ', @{ $flags->{$name} } ) . "\n";
     }
 }
 



More information about the Bps-public-commit mailing list