summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2023-02-19 14:15:13 +0100
committerFlorian Pritz <bluewind@xinu.at>2023-02-19 14:15:13 +0100
commit07ac7bf85f3d03de265e16422cdcdfd24211708a (patch)
treebf35e393d5d55b1cf587351d51d0eceb7e375134
parentb33a064dbfeeed68c9256b3678d63d444a474ddd (diff)
downloadApp-ArchLinux-PackagerTools-07ac7bf85f3d03de265e16422cdcdfd24211708a.tar.gz
App-ArchLinux-PackagerTools-07ac7bf85f3d03de265e16422cdcdfd24211708a.tar.xz
Fix broken croak calls
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--cpanfile1
-rw-r--r--lib/App/ArchLinux/PackagerTools/Archweb.pm1
-rw-r--r--lib/App/ArchLinux/PackagerTools/Pacman.pm3
3 files changed, 4 insertions, 1 deletions
diff --git a/cpanfile b/cpanfile
index 0070edb..be5d61a 100644
--- a/cpanfile
+++ b/cpanfile
@@ -1,3 +1,4 @@
+requires 'Array::Utils';
requires 'CHI';
requires 'CPAN::DistnameInfo';
requires 'Function::Parameters';
diff --git a/lib/App/ArchLinux/PackagerTools/Archweb.pm b/lib/App/ArchLinux/PackagerTools/Archweb.pm
index 5f3bcfa..8c92d95 100644
--- a/lib/App/ArchLinux/PackagerTools/Archweb.pm
+++ b/lib/App/ArchLinux/PackagerTools/Archweb.pm
@@ -2,6 +2,7 @@ package App::ArchLinux::PackagerTools::Archweb;
use strictures;
use autodie;
+use Carp;
use Function::Parameters;
use Log::Any qw($log);
use WWW::JSON;
diff --git a/lib/App/ArchLinux/PackagerTools/Pacman.pm b/lib/App/ArchLinux/PackagerTools/Pacman.pm
index 287d2a9..66f4ff4 100644
--- a/lib/App/ArchLinux/PackagerTools/Pacman.pm
+++ b/lib/App/ArchLinux/PackagerTools/Pacman.pm
@@ -4,6 +4,7 @@ use strictures;
use autodie;
use Function::Parameters;
use Log::Any qw($log);
+use Carp;
use App::ArchLinux::PackagerTools::CPAN;
@@ -155,7 +156,7 @@ method get_packages_versions($package_names) {
$log->debugf("Package '%s' has version '%s' in repository", $pkgname, $version);
}
if ($package_names->@* != keys %versions) {
- croak $log->error("Failed to find version for all packages. Got %d packages and %d versions were detected", scalar($package_names->@*), scalar(keys %versions));
+ croak $log->errorf("Failed to find version for all packages. Got %d packages and %d versions were detected", scalar($package_names->@*), scalar(keys %versions));
}
return \%versions;
}