diff options
-rw-r--r-- | cpanfile | 1 | ||||
-rw-r--r-- | lib/App/ArchLinux/PackagerTools/Archweb.pm | 1 | ||||
-rw-r--r-- | lib/App/ArchLinux/PackagerTools/Config.pm | 1 | ||||
-rw-r--r-- | lib/App/ArchLinux/PackagerTools/Pacman.pm | 3 | ||||
-rwxr-xr-x | script/perlpkg.pl | 3 | ||||
-rw-r--r-- | t/PackagerTools.t | 2 |
6 files changed, 7 insertions, 4 deletions
@@ -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/Config.pm b/lib/App/ArchLinux/PackagerTools/Config.pm index ed17238..26810f1 100644 --- a/lib/App/ArchLinux/PackagerTools/Config.pm +++ b/lib/App/ArchLinux/PackagerTools/Config.pm @@ -123,7 +123,6 @@ method _get_default_config() { 'perl-ldap' => 'perl-ldap', 'perl-libintl-perl' => 'libintl-perl', 'perl-libwww' => 'libwww-perl', - 'perl-locale-gettext' => 'gettext', 'perl-perlio-utf8-strict' => 'PerlIO-utf8_strict', 'perl-svn-simple-edit' => 'SVN-Simple', 'perl-term-readkey' => 'TermReadKey', 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; } diff --git a/script/perlpkg.pl b/script/perlpkg.pl index 195adc9..c78a05e 100755 --- a/script/perlpkg.pl +++ b/script/perlpkg.pl @@ -8,6 +8,7 @@ use strict; use Function::Parameters; use Log::Any::Adapter; use Log::Log4perl qw(:easy); +use JSON; use App::ArchLinux::PackagerTools; @@ -54,7 +55,7 @@ use Data::Dumper; my $filtered_pkgs = $app->get_filtered_updateable_packages(); -print Dumper($filtered_pkgs); +print encode_json($filtered_pkgs); # TODO generate new pacakge pkgbuild # TODO build diff --git a/t/PackagerTools.t b/t/PackagerTools.t index 68a3459..dace577 100644 --- a/t/PackagerTools.t +++ b/t/PackagerTools.t @@ -148,6 +148,6 @@ eq_or_diff($app->get_filtered_updateable_packages(), [ pkgname => 'perl-diff-maint', repo_version => '1.0' }, -], 'Filtered list of updateable packages should include Test::FOO, but NOT foobar-blub'); +], 'Filtered list of updateable packages should include Test::FOO and Diff::Maint, but NOT foobar-blub'); done_testing; |