From b69ea341bf2a46bc7d654aa899c7526d656e8da2 Mon Sep 17 00:00:00 2001
From: Andreas Romeyke <andreas.romeyke@slub-dresden.de>
Date: Mon, 20 Feb 2023 16:31:19 +0100
Subject: [PATCH] - fixed module loading order

---
 lib/SLUB/LZA/Rosetta/TA/Command/count.pm  | 3 ++-
 lib/SLUB/LZA/Rosetta/TA/Command/init.pm   | 5 +++--
 lib/SLUB/LZA/Rosetta/TA/Command/log.pm    | 3 ++-
 lib/SLUB/LZA/Rosetta/TA/Command/search.pm | 4 +++-
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/lib/SLUB/LZA/Rosetta/TA/Command/count.pm b/lib/SLUB/LZA/Rosetta/TA/Command/count.pm
index 5f527da..80cdcec 100644
--- a/lib/SLUB/LZA/Rosetta/TA/Command/count.pm
+++ b/lib/SLUB/LZA/Rosetta/TA/Command/count.pm
@@ -1,11 +1,11 @@
 package SLUB::LZA::Rosetta::TA::Command::count;
+use SLUB::LZA::Rosetta::TA -command;
 use strict;
 use warnings;
 use feature qw(say);
 use SLUB::LZA::Rosetta::TA::common_sru;
 use SLUB::LZA::Rosetta::TA::SRU;
 
-use SLUB::LZA::Rosetta::TA -command;
 
 # VERSION
 
@@ -65,6 +65,7 @@ sub validate_args {
     my ($self, $opt, $args) = @_;
     # no args allowed but options!
     $self->usage_error("No args allowed") if @$args;
+    1;
 }
 
 sub execute {
diff --git a/lib/SLUB/LZA/Rosetta/TA/Command/init.pm b/lib/SLUB/LZA/Rosetta/TA/Command/init.pm
index ce1f737..774bec8 100644
--- a/lib/SLUB/LZA/Rosetta/TA/Command/init.pm
+++ b/lib/SLUB/LZA/Rosetta/TA/Command/init.pm
@@ -1,4 +1,5 @@
 package SLUB::LZA::Rosetta::TA::Command::init;
+use SLUB::LZA::Rosetta::TA -command;
 use strict;
 use warnings;
 use YAML qw(DumpFile);
@@ -8,7 +9,7 @@ use Crypt::Mode::CBC;
 use Path::Tiny;
 use namespace::autoclean;
 
-use SLUB::LZA::Rosetta::TA -command;
+
 
 # VERSION
 
@@ -21,7 +22,7 @@ sub opt_spec {
         ["verbose|v" => "enable verbose output"],
         ["rosettahost|r=s" => "host adress where Rosetta runs", {required=>1}],
         ["logdir|l=s" => "logdir where rosetta stores it server log files", {required=>1}],
-        ["authentication|a" => "enable authentification (needed if Rosetta's general parameter 'sru_authentication=true'), password is stored salted only in config file!", {required=>0}]
+        ["authentication|a" => "enable authentification (needed if Rosetta's general parameter 'sru_authentication=true'), password is stored salted only in config file!", {required=>0}],
         ["httponly" => "with this flag only HTTP (instead HTTPS) is used", {required=>0}],
     );
 }
diff --git a/lib/SLUB/LZA/Rosetta/TA/Command/log.pm b/lib/SLUB/LZA/Rosetta/TA/Command/log.pm
index 612714d..f82e889 100644
--- a/lib/SLUB/LZA/Rosetta/TA/Command/log.pm
+++ b/lib/SLUB/LZA/Rosetta/TA/Command/log.pm
@@ -1,4 +1,5 @@
 package SLUB::LZA::Rosetta::TA::Command::log;
+use SLUB::LZA::Rosetta::TA -command;
 use strict;
 use warnings;
 use feature qw(say);
@@ -8,7 +9,7 @@ use DateTime::Format::DateParse;
 use namespace::autoclean;
 use SLUB::LZA::Rosetta::TA::Log;
 
-use SLUB::LZA::Rosetta::TA -command;
+
 
 # VERSION
 
diff --git a/lib/SLUB/LZA/Rosetta/TA/Command/search.pm b/lib/SLUB/LZA/Rosetta/TA/Command/search.pm
index 31f8ed2..54cfdec 100644
--- a/lib/SLUB/LZA/Rosetta/TA/Command/search.pm
+++ b/lib/SLUB/LZA/Rosetta/TA/Command/search.pm
@@ -1,11 +1,12 @@
 package SLUB::LZA::Rosetta::TA::Command::search;
+use SLUB::LZA::Rosetta::TA -command;
 use strict;
 use warnings;
 use feature qw(say);
 use SLUB::LZA::Rosetta::TA::common_sru;
 use SLUB::LZA::Rosetta::TA::SRU;
 
-use SLUB::LZA::Rosetta::TA -command;
+
 
 # VERSION
 
@@ -71,6 +72,7 @@ sub validate_args {
     my ($self, $opt, $args) = @_;
     # no args allowed but options!
     $self->usage_error("No args allowed") if @$args;
+    1;
 }
 
 sub execute {
-- 
GitLab