Skip to content
Permalink
Browse files

Fix dist lookup caching

If a distribution is not found then do not cache the value. This allows run time module installations to be found with resolve/candidates.
  • Loading branch information...
ugexe committed Nov 1, 2017
1 parent 29d7470 commit 085fa19cfbe53cbfeea8f7937c56dc18bb0d92f2
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/CompUnit/Repository/Installation.pm
@@ -455,11 +455,11 @@ sub MAIN(:$name, :$auth, :$ver, *@, *%) {
method !matching-dist(CompUnit::DependencySpecification $spec) {
return %!seen{~$spec} if %!seen{~$spec}:exists;

my $dist = self.candidates($spec).head;

$!lock.protect: {
return %!seen{~$spec} //= $dist;
with self.candidates($spec).head {
$!lock.protect: { return %!seen{~$spec} //= $_ }
}

Nil
}

# Allows a distribution to re-populate its meta data

0 comments on commit 085fa19

Please sign in to comment.
You can’t perform that action at this time.