Skip to content

Commit

Permalink
Include every repo only once in the $*REPO chain
Browse files Browse the repository at this point in the history
CompUnitRepo caches repositories by path and will give you the same repo object
for the same path. Since repos are now a linked list, re-using an object from
the end of the list, will give you a rather short chain.

Having a path represented by only a single object is still a good idea. And
there should be no reason to have a path in multiple places of the repo chain,
so avoid the breakage by making sure we include every repo only once.
  • Loading branch information
niner committed Nov 1, 2015
1 parent d3e60c5 commit 3fa2369
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Process.pm
Expand Up @@ -38,7 +38,7 @@ multi sub INITIALIZE_DYNAMIC('$*TMPDIR') {

multi sub INITIALIZE_DYNAMIC('$*REPO') {
my CompUnit::Repository $next-repo;
$next-repo := CompUnitRepo.new($_, :$next-repo) for @*INC.reverse;
$next-repo := CompUnitRepo.new($_, :$next-repo) for @*INC.unique.reverse;
PROCESS::<$REPO> := $next-repo;
}

Expand Down

0 comments on commit 3fa2369

Please sign in to comment.