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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jun 26 18:24:19 EDT 2008


Author: sunnavy
Date: Thu Jun 26 18:24:19 2008
New Revision: 13627

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

Log:
 r13863 at sunnavys-mb:  sunnavy | 2008-06-27 06:24:04 +0800
 mandatory instead of mandatary


Modified: Shipwright/trunk/lib/Shipwright/Script/Flags.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Flags.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Flags.pm	Thu Jun 26 18:24:19 2008
@@ -5,7 +5,7 @@
 use Carp;
 
 use base qw/App::CLI::Command Class::Accessor::Fast Shipwright::Script/;
-__PACKAGE__->mk_accessors(qw/add delete set mandatary/);
+__PACKAGE__->mk_accessors(qw/add delete set mandatory/);
 
 use Shipwright;
 use List::MoreUtils qw/uniq/;
@@ -15,7 +15,7 @@
         'a|add=s'    => 'add',
         'd|delete=s' => 'delete',
         's|set=s'    => 'set',
-        'mandatary'  => 'mandatary',
+        'mandatory'  => 'mandatory',
     );
 }
 
@@ -64,8 +64,8 @@
         $list = [ grep { /^[-\w]+$/ } split /,\s*/, $self->set ];
     }
 
-    if ( $self->mandatary ) {
-        $flags->{__mandatary}{$name} = $list;
+    if ( $self->mandatory ) {
+        $flags->{__mandatory}{$name} = $list;
     }
     else {
         $flags->{$name} = $list;
@@ -83,11 +83,11 @@
     my $changed;
     $changed = 1 if $self->add || $self->delete || $self->set;
 
-    if ( $self->mandatary ) {
-        print "set mandatary flags with success\n" if $changed;
-        print "mandatary flags of $name is ";
-        if ( @{ $flags->{__mandatary}{$name} || [] } ) {
-            print join( ', ', @{ $flags->{__mandatary}{$name} } ) . "\n";
+    if ( $self->mandatory ) {
+        print "set mandatory flags with success\n" if $changed;
+        print "mandatory flags of $name is ";
+        if ( @{ $flags->{__mandatory}{$name} || [] } ) {
+            print join( ', ', @{ $flags->{__mandatory}{$name} } ) . "\n";
         }
         else {
             print "*nothing*\n";



More information about the Bps-public-commit mailing list