OSDN Git Service

Command: update documentation
authorhylom <hylom@users.sourceforge.jp>
Fri, 17 Aug 2018 10:00:48 +0000 (19:00 +0900)
committerhylom <hylom@users.sourceforge.jp>
Fri, 17 Aug 2018 10:00:48 +0000 (19:00 +0900)
src/newslash_web/lib/Newslash/Command.pm
src/newslash_web/lib/Newslash/Command/useradd.pm
src/newslash_web/lib/Newslash/Command/usermod.pm

index 8ffe76e..f5b1dff 100644 (file)
@@ -39,6 +39,23 @@ sub check_force_option {
 
 Newslash::Command - newslash administer command base class
 
+=head1 ATTRIBUTES
+
+L<Newslash::Command> inherits all attributes from
+L<Mojolicious::Command> and implements the following new ones.
+
+=head2 experimental
+
+  my $experimental = $daemon->experimental;
+
+Experimental flag that indicate experimental command.
+
+=head2 danger
+
+  my $danger = $daemon->danger;
+
+Danger flag that indicate danger (destructive) command.
+
 =head1 METHODS
 
 L<Newslash::Command> inherits all methods from
@@ -46,9 +63,11 @@ L<Mojolicious::Command> and implements the following new ones.
 
 =head2 check_options
 
-  $daemon->run(@ARGV);
+  $daemon->check_options(\@args);
 
-Run this command.
+Check if this command is danger/experimental, then check "-f" option given.
+if command is danger and "-f" option not given, return false.
+if command is experimental and mode is not "test" and "-f" option not given, return false.
 
 =head1 SEE ALSO
 
index a584a68..3e31dcc 100644 (file)
@@ -75,14 +75,14 @@ Newslash::Command::useradd - newslash administer command (useradd)
       --seclev <seclev>          seclev
       --author <0/1>             set author flag
 
-  =head1 DESCRIPTION
+=head1 DESCRIPTION
 
   L<Newslash::Command::useradd> inserts new user to newslash's user database.
 
 =head1 ATTRIBUTES
 
 L<Newslash::Command::useradd> inherits all attributes from
-L<Mojolicious::Command> and implements the following new ones.
+L<Newslash::Command> and implements the following new ones.
 
 =head2 description
 
@@ -101,7 +101,7 @@ Usage information for this command, used for the help screen.
 =head1 METHODS
 
 L<Newslash::Command::useradd> inherits all methods from
-L<Mojolicious::Command> and implements the following new ones.
+L<Newslash::Command> and implements the following new ones.
 
 =head2 run
 
index a978e82..e9221ca 100644 (file)
@@ -71,14 +71,14 @@ Newslash::Command::usermod - newslash administer command (usermod)
       --password <password>  update password
       --author <0/1>         add/remove author flag
 
-  =head1 DESCRIPTION
+=head1 DESCRIPTION
 
   L<Newslash::Command::usermod> updates newslash's user database.
 
 =head1 ATTRIBUTES
 
 L<Newslash::Command::usermod> inherits all attributes from
-L<Mojolicious::Command> and implements the following new ones.
+L<Newslash::Command> and implements the following new ones.
 
 =head2 description
 
@@ -97,7 +97,7 @@ Usage information for this command, used for the help screen.
 =head1 METHODS
 
 L<Newslash::Command::usermod> inherits all methods from
-L<Mojolicious::Command> and implements the following new ones.
+L<Newslash::Command> and implements the following new ones.
 
 =head2 run