mirror of
https://github.com/duncs/clusterssh.git
synced 2025-04-21 09:09:06 +00:00
Start setting up the options in a standard way
This commit is contained in:
parent
be4093f728
commit
8569cdaca5
1 changed files with 19 additions and 9 deletions
|
@ -97,20 +97,13 @@ sub new {
|
|||
$self->loc("Enable debugging. Either a level can be provided or the option can be repeated multiple times. Maximum level is 4."),
|
||||
default => 0,
|
||||
},
|
||||
'help|h' =>
|
||||
{ help => $self->loc("Show help text and exit"), },
|
||||
'usage|?' =>
|
||||
{ help => $self->loc('Show basic usage and exit'), },
|
||||
'version|v' =>
|
||||
{ help => $self->loc("Show version information and exit"), },
|
||||
'man|H' => {
|
||||
help => $self->loc("Show full help text (the man page) and exit"),
|
||||
},
|
||||
'generate-pod' => {
|
||||
hidden => 1,
|
||||
},
|
||||
};
|
||||
|
||||
$self->add_common_options;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
@ -124,6 +117,23 @@ sub add_option {
|
|||
sub add_common_options {
|
||||
my ( $self ) = @_;
|
||||
|
||||
$self->add_option(
|
||||
spec => 'help|h' ,
|
||||
help => $self->loc("Show help text and exit"),
|
||||
);
|
||||
$self->add_option(
|
||||
spec => 'usage|?' ,
|
||||
help => $self->loc('Show basic usage and exit'),
|
||||
);
|
||||
$self->add_option(
|
||||
spec => 'version|v' ,
|
||||
help => $self->loc("Show version information and exit"),
|
||||
);
|
||||
$self->add_option(
|
||||
spec => 'man|H' ,
|
||||
help => $self->loc("Show full help text (the man page) and exit"),
|
||||
);
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue