summaryrefslogtreecommitdiffstats
path: root/lib/App/ArchLinux/PackagerTools.pm
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-11-19 00:03:42 +0100
committerFlorian Pritz <bluewind@xinu.at>2018-11-19 00:03:42 +0100
commit12201461e927af015caefc583a2ab5514c63668b (patch)
treeabe8cd8efbe54f333096a99201dc0acdade68cef /lib/App/ArchLinux/PackagerTools.pm
parente93e80dede905b653e35b8bb4e8f31f0c58719bd (diff)
downloadApp-ArchLinux-PackagerTools-12201461e927af015caefc583a2ab5514c63668b.tar.gz
App-ArchLinux-PackagerTools-12201461e927af015caefc583a2ab5514c63668b.tar.xz
Add documentation
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App/ArchLinux/PackagerTools.pm')
-rw-r--r--lib/App/ArchLinux/PackagerTools.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/App/ArchLinux/PackagerTools.pm b/lib/App/ArchLinux/PackagerTools.pm
index d8cb89d..0a45bb8 100644
--- a/lib/App/ArchLinux/PackagerTools.pm
+++ b/lib/App/ArchLinux/PackagerTools.pm
@@ -49,10 +49,35 @@ method new_no_defaults($class: $deps = {}) {
return $self;
}
+=head3 get_distributions_in_repo
+
+ my $dists = $app->get_distributions_in_repo();
+
+Return an arrayref of hashrefs with CPAN distribution information. See
+L<App::ArchLinux::PackagerTools::Pacman/"get_perl_distributions">.
+
+=cut
+
method get_distributions_in_repo() {
return $self->{deps}->{pacman}->get_perl_distributions();
}
+=head3 get_updateable_packages
+
+ my $distribution_names = ['App::ArchLinux::PackagerTools', 'DBI'];
+ my $packages = $app->get_updateable_packages($distribution_names);
+ print $packages[0]->{dist_name};
+ print $packages[0]->{pkgname};
+ print $packages[0]->{repo_version};
+ print $packages[0]->{cpan_version};
+
+Accepts a list of package names and returns a list of packages that can be
+updated. The returned packages contain the name of the distribution, the name
+of the pacman package, and the versions of each, the pacman package (which is
+older) and the CPAN distribution.
+
+=cut
+
method get_updateable_packages($distribution_names) {
my @packages;
for my $dist_name ($distribution_names->@*) {