summaryrefslogtreecommitdiffstats
path: root/lib/App/ArchLinux/PackagerTools/Pacman.pm
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-12-17 16:33:25 +0100
committerFlorian Pritz <bluewind@xinu.at>2018-12-17 16:33:25 +0100
commitf2b5d9bacf8e109fe27cea8f68232d41fd3b3ea5 (patch)
tree6f56fe0013bc8cb43d53a162f030adbf797af850 /lib/App/ArchLinux/PackagerTools/Pacman.pm
parent20e07437f413e338f2b54447133e1533f5262c13 (diff)
downloadApp-ArchLinux-PackagerTools-f2b5d9bacf8e109fe27cea8f68232d41fd3b3ea5.tar.gz
App-ArchLinux-PackagerTools-f2b5d9bacf8e109fe27cea8f68232d41fd3b3ea5.tar.xz
Make context parameter explicit
This prevents a loop in $deps->{..}->{context} which is 1) unnecessary and 2) potentially breaks memory recovery when things get deleted. Not the case right now, but whatever. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib/App/ArchLinux/PackagerTools/Pacman.pm')
-rw-r--r--lib/App/ArchLinux/PackagerTools/Pacman.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/App/ArchLinux/PackagerTools/Pacman.pm b/lib/App/ArchLinux/PackagerTools/Pacman.pm
index f541721..3204ca1 100644
--- a/lib/App/ArchLinux/PackagerTools/Pacman.pm
+++ b/lib/App/ArchLinux/PackagerTools/Pacman.pm
@@ -35,17 +35,17 @@ Returns a new instance.
=cut
-method new($class: $deps = {}) {
- $deps->{cpan} //= App::ArchLinux::PackagerTools::CPAN->new({$deps->%{context}});
+method new($class: $context, $deps = {}) {
+ $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',
};
- return $class->new_no_defaults($deps);
+ return $class->new_no_defaults($context, $deps);
}
-method new_no_defaults($class: $deps = {}) {
+method new_no_defaults($class: $context, $deps = {}) {
my $self = {};
bless $self, $class;
$deps->{cpan_name_pkgname_map} = {reverse $deps->{pkgname_cpan_name_map}->%*};