summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/App/ArchLinux/PackagerTools/Pacman.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/App/ArchLinux/PackagerTools/Pacman.pm b/lib/App/ArchLinux/PackagerTools/Pacman.pm
index b9fe988..39c78e5 100644
--- a/lib/App/ArchLinux/PackagerTools/Pacman.pm
+++ b/lib/App/ArchLinux/PackagerTools/Pacman.pm
@@ -48,6 +48,7 @@ method new($class: $deps = {}) {
method new_no_defaults($class: $deps = {}) {
my $self = {};
bless $self, $class;
+ $deps->{cpan_name_pkgname_map} = {reverse $deps->{pkgname_cpan_name_map}->%*};
$self->{deps} = $deps;
return $self;
}
@@ -166,7 +167,9 @@ also return other names if they are mapped differently.
=cut
method get_perl_pkgname($dist_name) {
- # TODO implement mapping
+ if (defined $self->{deps}->{cpan_name_pkgname_map}->{$dist_name}) {
+ return $self->{deps}->{cpan_name_pkgname_map}->{$dist_name};
+ }
my $pkgname = lc($dist_name);
$pkgname =~ s/::/-/g;
$pkgname = "perl-$pkgname";