diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-12-17 17:10:19 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-12-17 17:10:19 +0100 |
commit | b4120e3d85cbb78f52ede38ce99d9ba60029d037 (patch) | |
tree | 9edab354b7752f9a37c6d6935d7f5c99a6b10df6 /lib/App/ArchLinux | |
parent | 7c68605636c2c6f5a52ccf4c7536d87d67102a85 (diff) | |
download | App-ArchLinux-PackagerTools-b4120e3d85cbb78f52ede38ce99d9ba60029d037.tar.gz App-ArchLinux-PackagerTools-b4120e3d85cbb78f52ede38ce99d9ba60029d037.tar.xz |
get_updateable_packages(): Improve readability
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App/ArchLinux')
-rw-r--r-- | lib/App/ArchLinux/PackagerTools.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/App/ArchLinux/PackagerTools.pm b/lib/App/ArchLinux/PackagerTools.pm index 8fc22f9..216c54c 100644 --- a/lib/App/ArchLinux/PackagerTools.pm +++ b/lib/App/ArchLinux/PackagerTools.pm @@ -83,13 +83,15 @@ older) and the CPAN distribution. method get_updateable_packages($distribution_names) { my @packages; - my $repo_versions = $self->{deps}->{pacman}->get_perl_distribution_versions($distribution_names); + my $cpan = $self->{deps}->{cpan}; + my $pacman = $self->{deps}->{pacman}; + + my $repo_versions = $pacman->get_perl_distribution_versions($distribution_names); for my $dist_name ($distribution_names->@*) { - #my $repo_version = $self->{deps}->{pacman}->get_perl_distribution_version($dist_name); my $repo_version = $repo_versions->{$dist_name}; - my $dist = $self->{deps}->{cpan}->get_dist($dist_name); - if ($self->{deps}->{cpan}->is_newer_version_available($dist_name, $repo_version)) { - my $pkgname = $self->{deps}->{pacman}->get_perl_pkgname($dist_name); + my $dist = $cpan->get_dist($dist_name); + if ($cpan->is_newer_version_available($dist_name, $repo_version)) { + my $pkgname = $pacman->get_perl_pkgname($dist_name); $log->infof('New version available for dist \'%s\' in package \'%s\': %s -> %s', $dist_name, $pkgname, $repo_version, $dist->{version}); push @packages, { dist_name => $dist_name, |