From 94706f227fff6f561b2f481a8dbac4b0eb86a5a6 Mon Sep 17 00:00:00 2001
From: Andreas Romeyke <andreas.romeyke@slub-dresden.de>
Date: Tue, 28 May 2024 11:34:11 +0200
Subject: [PATCH] - add global opts

---
 lib/SLUB/LZA/TA/Command/info.pm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/SLUB/LZA/TA/Command/info.pm b/lib/SLUB/LZA/TA/Command/info.pm
index 688033d..61c3ec6 100644
--- a/lib/SLUB/LZA/TA/Command/info.pm
+++ b/lib/SLUB/LZA/TA/Command/info.pm
@@ -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;
 }
 
-- 
GitLab