/
Distribution.pod6
36 lines (23 loc) 路 1.06 KB
/
Distribution.pod6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
=begin pod
=TITLE role Distribution
=SUBTITLE Distribution
role Distribution { }
Interface for objects that provide API access mapping META6 data to the files
its represents. Objects that fulfill the C<Distribution> role can be read by
e.g. L<CompUnit::Repository::Installation>. Generally a C<Distribution> provides
read access to a set of modules and metadata. These may be backed by the
filesystem (L<Distribution::Path>, L<Distribution::Hash>) but could also read
from a e.g. tar file or socket.
=head1 Required Methods
=head2 method meta
method meta(--> Hash:D) { ... }
Returns a Hash with the representation of the metadata. Please note that an
actual C<META6.json> file does not need to exist, just a representation in that
format.
=head2 method content
method content($name-path --> IO::Handle:D) { ... }
Returns an C<IO::Handle> to the file represented by C<$name-path>. C<$name-path>
is a relative path as it would be found in the metadata such as C<lib/Foo.pm6>
or C<resources/foo.txt>.
=end pod
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6