logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

App::CLI::Command - Base class for App::CLI commands

Authors

       Chia-liang Kao <clkao@clkao.org> Cornelius Lin  <cornelius.howl@gmail.com> shelling
       <navyblueshellingford@gmail.com>

Description

subcommand()

           return old genre subcommand of $self;

       cascading()

       return instance of cascading subcommand invoked if it was listed in your constant subcommands.

       cascadable()

       return package name of subcommand if the subcommand invoked is in you constant subcommands

       otherwise, return undef

       brief_usage($file)

       Display an one-line brief usage of the command object.  Optionally, a file could be given to extract the
       usage from the POD.

       usage($want_detail)

       Display usage.  If $want_detail is true, the "DESCRIPTION" section is displayed as well.

       loc_text$text

       Localizes the body of (formatted) text in $text, and returns the localized version.

       filename

       Return the filename for the command module.

Name

       App::CLI::Command - Base class for App::CLI commands

See Also

       App::CLI Getopt::Long

Synopsis

           package MyApp::List;
           use base qw(App::CLI::Command);

           use constant options => (
               'verbose'   => 'verbose',
               'n|name=s'  => 'name',
           );

           sub run {
               my ( $self, $arg ) = @_;

               print "verbose" if $self->{verbose};

               my $name = $self->{name}; # get arg following long option --name

               # any thing your want this command do
           }

           # See App::CLI for information of how to invoke (sub)command.

See Also