Documentation for method candidates assembled from the following pages:

Class: CompUnit::Repository::FileSystem §

From CompUnit::Repository::FileSystem

(CompUnit::Repository::FileSystem) method candidates §

multi method candidates(Str:D $name:$auth:$ver:$api)
multi method candidates(CompUnit::DependencySpecification $spec)

Return all distributions that contain a module matching the specified $name, auth, ver, and api.

# assuming one is cloned into the zef git repository... 
my $repo = CompUnit::Repository::FileSystem.new(prefix => $*CWD);
with $repo.candidates("Zef").head -> $dist {
    say "Zef version: " ~ $dist.meta<version>;
}
else {
    say "No candidates for 'Zef' found";
}

Class: CompUnit::Repository::Installation §

From CompUnit::Repository::Installation

(CompUnit::Repository::Installation) method candidates §

multi method candidates(Str:D $name:$auth:$ver:$api)
multi method candidates(CompUnit::DependencySpecification $spec)

Return all distributions that contain a module matching the specified $name, auth, ver, and api.

my $inst-repo-path = CompUnit::RepositoryRegistry.repository-for-name("perl").prefix;
my $inst-repo = CompUnit::Repository::Installation.new(prefix => $inst-repo-path);
my $dist = $inst-repo.candidates("Test").head;
say "Test version: " ~ $dist.meta<ver># OUTPUT: «6.d␤»

Class: Routine §

From Routine

(Routine) method candidates §

method candidates(Routine:D: --> Positional:D)

Returns a list of multi candidates, or a one-element list with itself if it's not a multi