summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2018-12-17 00:42:13 +0100
committerFlorian Pritz <bluewind@xinu.at>2018-12-17 00:42:13 +0100
commit135686539f7d0e8c51555e37a334b9556fd55a19 (patch)
tree1c1a301abf0a920c4c509bd989fd30481d5d7b4c
parent90535df46d0d8b4052497a9dc0beacd8c186066f (diff)
downloadApp-ArchLinux-PackagerTools-135686539f7d0e8c51555e37a334b9556fd55a19.tar.gz
App-ArchLinux-PackagerTools-135686539f7d0e8c51555e37a334b9556fd55a19.tar.xz
Initialize context in top level package
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--lib/App/ArchLinux/PackagerTools.pm1
-rwxr-xr-xscript/perlpkg.pl3
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/App/ArchLinux/PackagerTools.pm b/lib/App/ArchLinux/PackagerTools.pm
index 0bd602a..0fbd224 100644
--- a/lib/App/ArchLinux/PackagerTools.pm
+++ b/lib/App/ArchLinux/PackagerTools.pm
@@ -38,6 +38,7 @@ 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}});
diff --git a/script/perlpkg.pl b/script/perlpkg.pl
index f66b9d6..e6cac27 100755
--- a/script/perlpkg.pl
+++ b/script/perlpkg.pl
@@ -48,8 +48,7 @@ if ($ARGV[0] // "" eq "--debug") {
}
Log::Any::Adapter->set('Log4perl');
-my $context = {};
-my $app = App::ArchLinux::PackagerTools->new({context => $context});
+my $app = App::ArchLinux::PackagerTools->new();
use Data::Dumper;
my $dists = $app->get_distributions_in_repo();