role Distribution
ErrorsCollection

role Distribution

Distribution

role Distribution { }

This role is an interface for objects that provide API access mapping META6 data to the files it represents. Objects that fulfill the Distribution role can be read by e.g. CompUnit::Repository::Installation. Generally a Distribution provides read access to a set of modules and metadata. These may be backed by the filesystem (Distribution::Path, Distribution::Hash) but could also read from an e.g. tar file or socket.

Required Methods

method meta

method meta(--> Hash:D{ ... }

Returns a Hash with the representation of the metadata. Please note that an actual META6.json file does not need to exist, just a representation in that format.

method content

method content($name-path --> IO::Handle:D{ ... }

Returns an IO::Handle to the file represented by $name-path. $name-path is a relative path as it would be found in the metadata such as lib/Foo.rakumod or resources/foo.txt.