Sympa::CLI(3Sympa) | sympa 6.2.70 | Sympa::CLI(3Sympa) |
Sympa::CLI - Base class of Sympa CLI modules
package Sympa::CLI::mycommand; use parent qw(Sympa::CLI); use constant _options => qw(...); use constant _args => qw(...); use constant _need_priv => 0; sub _run { my $class = shift; my $options = shift; my @argv = @_; #... Do the job... exit 0; }
This will implement the function of sympa mycommand.
Sympa::CLI is the base class of the classes which defines particular command of command line utility. TBD.
By default no options are defined.
By default no mandatory arguments are defined.
By default redirection is disabled.
To implement a subcommand, simply create a submodule inheriting the module for parent command:
package Sympa::CLI::mycommand::subcommand; use parent qw(Sympa::CLI::mycommand); ...
Then this will implement the function of sympa mycommand subcommand.
Sympa::CLI appeared on Sympa 6.2.68.
2023-01-26 | 6.2.70 |