summaryrefslogtreecommitdiffstats
path: root/lib/App/ArchLinux/PackagerTools/Config.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/App/ArchLinux/PackagerTools/Config.pm')
-rw-r--r--lib/App/ArchLinux/PackagerTools/Config.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/App/ArchLinux/PackagerTools/Config.pm b/lib/App/ArchLinux/PackagerTools/Config.pm
index a44c845..470a1ae 100644
--- a/lib/App/ArchLinux/PackagerTools/Config.pm
+++ b/lib/App/ArchLinux/PackagerTools/Config.pm
@@ -37,9 +37,12 @@ method new($class: $deps = {}) {
}
method new_no_defaults($class: $deps = {}) {
+ return $deps->{context}->{$class} if defined $deps->{context}->{$class};
+
my $self = {};
bless $self, $class;
$self->{deps} = $deps;
+ $deps->{context}->{$class} = $self;
return $self;
}
@@ -80,6 +83,10 @@ Return a hash with the default config values.
method _get_default_config() {
return {
+ cache => {
+ root_dir => path(($ENV{XDG_CACHE_HOME} // $ENV{HOME}."/.cache")."/perlpkg/v1/")->stringify(),
+ cache_size => '50M',
+ },
};
}