diff options
Diffstat (limited to 'lib/App/ArchLinux/PackagerTools/CPAN.pm')
-rw-r--r-- | lib/App/ArchLinux/PackagerTools/CPAN.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/App/ArchLinux/PackagerTools/CPAN.pm b/lib/App/ArchLinux/PackagerTools/CPAN.pm index 1e1c86c..e7521b6 100644 --- a/lib/App/ArchLinux/PackagerTools/CPAN.pm +++ b/lib/App/ArchLinux/PackagerTools/CPAN.pm @@ -38,16 +38,19 @@ Returns a new instance. =cut method new($class: $deps = {}) { - $deps->{packages_details_fetcher} //= App::ArchLinux::PackagerTools::CPAN::PackagesDetailsFetcher->new(); + $deps->{packages_details_fetcher} //= App::ArchLinux::PackagerTools::CPAN::PackagesDetailsFetcher->new({$deps->%{context}}); return $class->new_no_defaults($deps); } method new_no_defaults($class: $deps = {}) { + return $deps->{context}->{__PACKAGE__} if defined $deps->{context}->{__PACKAGE__}; + my $self = {}; bless $self, $class; $self->{deps} = $deps; $self->{dist_lc_map} = {}; $self->{dists} = {}; + $deps->{context}->{__PACKAGE__} = $self; return $self; } |