Ado::Command::adduser - adduser command
use Ado::Command::adduser; Ado::Command::adduser->run('--login_name'=>'test1',...);
Ado::Command::adduser adds a user to an Ado application. It is a facade for Ado::Model::Users. This is a core Ado command, that means it is always enabled and its code a good example for learning to build new Ado commands, you're welcome to fork it.
Ado::Command::adduser inherits all attributes from Ado::Command and implements the following new ones.
$self->args(login_name=>'peter','ingroup'=>'facebook'); my $args = $self->args;
Default arguments for creating a user.
my $description = $a->description; $a = $a->description('Foo!');
Short description of this command, used for the command list.
my $usage = $a->usage; $a = $a->usage('Foo!');
Usage information for this command, used for the help screen.
On the commandline ado adduser accepts the following options:
ado adduser
'u|login_name=s' #username (mandatory) 'p|login_password=s' #the user password (optional, random is generated) 'e|email=s' #user email (mandatory) 'g|ingroup=s' #additional group, can be used for existing users too 'd|disabled:i' #is user disabled? (1 by default) 'f|first_name=s' #user's first name (mandatory) 'l|last_name=s' #user's last name (mandatory) 'start_date=s' #format: %Y-%m-%d (optional, today by default)
Ado::Command::adduser inherits all methods from Ado::Command and implements the following new ones.
Calls the default parent "init" in Ado::Command and parses the arguments passed on the command-line. Returns true on success. Croaks with "usage" message on failure.
The default and only action this command implements. Makes logical checks for existing user and group and calls "adduser" in Ado::Model::Users and "add_to_group" in Ado::Model::Users depending on parsed arguments. See "run" in Ado::Command.
Ado::Model::Users, Ado::Command Ado::Manual, Mojolicious::Command, Mojolicious, Mojolicious::Guides.
To install Ado, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ado
CPAN shell
perl -MCPAN -e shell install Ado
For more information on module installation, please visit the detailed CPAN module installation guide.