Skip to content
Snippets Groups Projects
Commit 94706f22 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- add global opts

parent cc5f4e22
No related branches found
No related tags found
No related merge requests found
......@@ -18,17 +18,17 @@ sub description {
return "$description"
}
sub opt_spec {
return (
[ 'help|h', 'print usage message and exit', { shortcircuit => 1 } ],
[ 'target-version|V' => 'get current elasticsearch version', { shortcircuit => 1 } ],
[ 'version|v', 'print version information', { shortcircuit => 1 } ],
my @global_opts= SLUB::LZA::TA::common_global_opt_spec();
my @local_opts = (
[ 'target-version|T' => 'get current elasticsearch version', { shortcircuit => 1 } ],
[ 'version|V', 'print '.$0.' version information', { shortcircuit => 1 } ],
);
return (@global_opts, [], @local_opts);
}
sub validate_args {
my ($self, $opt, $args) = @_;
# no args allowed but options!
$self->usage_error("No args allowed") if @$args;
SLUB::LZA::TA::validate_global(@_);
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment