summaryrefslogtreecommitdiffstats
path: root/lib/App/ArchLinux/PackagerTools/Pacman.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App/ArchLinux/PackagerTools/Pacman.pm')
-rw-r--r--lib/App/ArchLinux/PackagerTools/Pacman.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/App/ArchLinux/PackagerTools/Pacman.pm b/lib/App/ArchLinux/PackagerTools/Pacman.pm
index 3204ca1..e1c6300 100644
--- a/lib/App/ArchLinux/PackagerTools/Pacman.pm
+++ b/lib/App/ArchLinux/PackagerTools/Pacman.pm
@@ -36,12 +36,12 @@ Returns a new instance.
method new($class: $context, $deps = {}) {
+ $deps->{config} //= App::ArchLinux::PackagerTools::Config->new($context);
$deps->{cpan} //= App::ArchLinux::PackagerTools::CPAN->new($context);
- $deps->{pkgname_cpan_name_map} //= {
- # pkgname => cpan_name
- 'perl-critic' => 'Perl::Critic',
- 'perl-libintl-perl' => 'libintl-perl',
- };
+
+ my $conf = $deps->{config}->get_config();
+ $deps->{pkgname_cpan_name_map} //= $conf->{pacman}->{pkgname_to_cpan_dist_map};
+
return $class->new_no_defaults($context, $deps);
}