From 2d8f96af70b1d8d3ed49e5999a75f66f657c5d52 Mon Sep 17 00:00:00 2001
From: Andreas Romeyke <andreas.romeyke@slub-dresden.de>
Date: Tue, 28 May 2024 14:07:48 +0200
Subject: [PATCH] - added global opts

---
 lib/SLUB/LZA/TA/Command/count.pm  | 1 +
 lib/SLUB/LZA/TA/Command/report.pm | 2 +-
 lib/SLUB/LZA/TA/Command/search.pm | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/SLUB/LZA/TA/Command/count.pm b/lib/SLUB/LZA/TA/Command/count.pm
index f81fba5..c54cdac 100644
--- a/lib/SLUB/LZA/TA/Command/count.pm
+++ b/lib/SLUB/LZA/TA/Command/count.pm
@@ -66,6 +66,7 @@ sub opt_spec {
 }
 sub validate_args {
     my ($self, $opt, $args) = @_;
+    SLUB::LZA::TA::common_global_validate($self, $opt, $args);
     # no args allowed but options!
     $self->usage_error("No args allowed") if @$args;
     if (exists $opt->{creationdate}) {
diff --git a/lib/SLUB/LZA/TA/Command/report.pm b/lib/SLUB/LZA/TA/Command/report.pm
index c27457a..99facd6 100644
--- a/lib/SLUB/LZA/TA/Command/report.pm
+++ b/lib/SLUB/LZA/TA/Command/report.pm
@@ -74,9 +74,9 @@ sub opt_spec {
 }
 sub validate_args {
     my ($self, $opt, $args) = @_;
+    SLUB::LZA::TA::common_global_validate($self, $opt, $args);
     # no args allowed but options!
     $self->usage_error("No args allowed") if @$args;
-    SLUB::LZA::TA::validate_global(@_);
     my ($cyear, $cmonth, $cday) = Today();
     my ($from_year, $from_month, $from_day);
     my ($to_year, $to_month, $to_day);
diff --git a/lib/SLUB/LZA/TA/Command/search.pm b/lib/SLUB/LZA/TA/Command/search.pm
index 9d0baae..d95d0d6 100644
--- a/lib/SLUB/LZA/TA/Command/search.pm
+++ b/lib/SLUB/LZA/TA/Command/search.pm
@@ -120,6 +120,7 @@ sub opt_spec {
 }
 sub validate_args {
     my ($self, $opt, $args) = @_;
+    SLUB::LZA::TA::common_global_validate($self, $opt, $args);
     # no args allowed but options!
     $self->usage_error("No args allowed") if @$args;
     if (exists $opt->{creationdate}) {
-- 
GitLab