summaryrefslogtreecommitdiffstats
path: root/lib/App/ArchLinux/PackagerTools.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App/ArchLinux/PackagerTools.pm')
-rw-r--r--lib/App/ArchLinux/PackagerTools.pm13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/App/ArchLinux/PackagerTools.pm b/lib/App/ArchLinux/PackagerTools.pm
index 0fbd224..8fc22f9 100644
--- a/lib/App/ArchLinux/PackagerTools.pm
+++ b/lib/App/ArchLinux/PackagerTools.pm
@@ -37,15 +37,14 @@ App::ArchLinux::PackagerTools is ...
Returns a new instance.
=cut
-method new($class: $deps = {}) {
- $deps->{context} //= {};
- $deps->{config} //= App::ArchLinux::PackagerTools::Config->new({$deps->%{context}});
- $deps->{cpan} //= App::ArchLinux::PackagerTools::CPAN->new({$deps->%{context}});
- $deps->{pacman} //= App::ArchLinux::PackagerTools::Pacman->new({$deps->%{context}});
- return $class->new_no_defaults($deps);
+method new($class: $context = {}, $deps = {}) {
+ $deps->{config} //= App::ArchLinux::PackagerTools::Config->new($context);
+ $deps->{cpan} //= App::ArchLinux::PackagerTools::CPAN->new($context);
+ $deps->{pacman} //= App::ArchLinux::PackagerTools::Pacman->new($context);
+ 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;
$self->{deps} = $deps;