summaryrefslogtreecommitdiffstats
path: root/lib/App/ArchLinux/PackagerTools/Cache.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App/ArchLinux/PackagerTools/Cache.pm')
-rw-r--r--lib/App/ArchLinux/PackagerTools/Cache.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/App/ArchLinux/PackagerTools/Cache.pm b/lib/App/ArchLinux/PackagerTools/Cache.pm
index b8415ad..6d5bec3 100644
--- a/lib/App/ArchLinux/PackagerTools/Cache.pm
+++ b/lib/App/ArchLinux/PackagerTools/Cache.pm
@@ -31,13 +31,13 @@ Returns a new instance.
=cut
-method new($class: $deps = {}) {
- $deps->{config} //= App::ArchLinux::PackagerTools::Config->new({$deps->%{context}});
- return $class->new_no_defaults($deps);
+method new($class: $context, $deps = {}) {
+ $deps->{config} //= App::ArchLinux::PackagerTools::Config->new($context);
+ return $class->new_no_defaults($context, $deps);
}
-method new_no_defaults($class: $deps = {}) {
- return $deps->{context}->{$class} if defined $deps->{context}->{$class};
+method new_no_defaults($class: $context, $deps = {}) {
+ return $context->{$class} if defined $context->{$class};
my $self = {};
bless $self, $class;
@@ -50,7 +50,7 @@ method new_no_defaults($class: $deps = {}) {
root_dir => $config->{cache}->{root_dir},
cache_size => $config->{cache}->{cache_size},
);
- $deps->{context}->{$class} = $self;
+ $context->{$class} = $self;
return $self;
}