CompUnit::Repository::FileSystem
does CompUnit::Repository::Locallydoes CompUnit::Repository
A CompUnit::Repository implementation backed by the filesystem typically used in development situations. This is what is used by -I .
/ -I lib
(which are actually -I file#.
and -I file#lib
) or use lib "."
/ use lib "lib"
. Unlike CompUnit::Repository::Installation, this represents a single distribution.
multi method candidates(Str , :, :, :)multi method candidates(CompUnit::DependencySpecification )
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 = CompUnit::Repository::FileSystem.new(prefix => );with .candidates("Zef").head ->else
multi method files(Str , :, :, :)multi method files(CompUnit::DependencySpecification )
Return all distributions that match the specified auth
ver
and api
, and contains a non-module file matching the specified $name
.
# assuming one is cloned into the zef git repository...my = CompUnit::Repository::FileSystem.new(prefix => );say .files('bin/zef', :ver<419.0+>).head.<name> // "Nada"; # OUTPUT: «Nada»say .files('resources/config.txt', :ver<419.0+>).head.<name> // "Nada"; # OUTPUT: «Nada»say .files('bin/zef', :ver<0.4.0+>).head.<name>; # OUTPUT: «zef»say .files('resources/config.txt', :ver<0.4.0+>).head.<name>; # OUTPUT: «zef»
method resolve(CompUnit::DependencySpecification --> CompUnit)
Returns a CompUnit mapped to the highest version distribution matching $spec
from the first repository in the repository chain that contains any version of a distribution matching $spec
.
method need(CompUnit::DependencySpecification ,CompUnit::PrecompilationRepository = self.precomp-repository(),CompUnit::PrecompilationStore : = self!precomp-stores(),--> CompUnit)
Loads and returns a CompUnit which is mapped to the highest version distribution matching $spec
from the first repository in the repository chain that contains any version of a distribution matching $spec
.
method load(IO::Path --> CompUnit)
Load the $file
and return a CompUnit object representing it.
method loaded(--> Iterable)
Returns all CompUnits this repository has loaded.
method short-id()
Returns the repo short-id, which for this repository is file
.