class Distribution::Locally

Distribution::Locally

role Distribution::Locally does Distribution { }

Provides read access to specific files pointed at by a distributions metadata, providing the Distribution#method_content method for Distribution::Path and Distribution::Hash.

Methods

method prefix

A prefix path to be used in conjuncture with the paths found in the metadata.

method content

Provides Distribution#method_content

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.pm6 or resources/foo.txt, and these paths will be prefixed with Distribution#method_prefix.

Type Graph

Type relations for Distribution::Locally
perl6-type-graph Distribution::Locally Distribution::Locally Distribution Distribution Distribution::Locally->Distribution Mu Mu Any Any Any->Mu Distribution::Hash Distribution::Hash Distribution::Hash->Distribution::Locally Distribution::Hash->Any Distribution::Path Distribution::Path Distribution::Path->Distribution::Locally Distribution::Path->Any

Expand above chart

Routines supplied by role Distribution

Distribution::Locally does role Distribution, which provides the following routines:

(Distribution) 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.

(Distribution) 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.pm6 or resources/foo.txt.