/
Hash.pod6
40 lines (24 loc) 路 1.11 KB
/
Hash.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
37
38
39
40
=begin pod :kind("Type") :subkind("class") :category("basic")
=TITLE class Distribution::Hash
=SUBTITLE Distribution::Hash
=for code :preamble<role Distribution::Locally {}>
class Distribution::Hash does Distribution::Locally { }
A L<Distribution|/type/Distribution> implementation backed by the filesystem. It
does not require a C<META6.json> file, essentially providing a lower level
L<C<Distribution::Path>|/type/Distribution::Path>.
=head1 Methods
=head2 method new
method new($hash, :$prefix)
Creates a new C<Distribution::Hash> instance from the metadata contained in
C<$hash>. All paths in the metadata will be prefixed with C<:$prefix>.
=head2 method meta
method meta()
Returns a Hash with the representation of the metadata.
=head2 method content
Please check
L<the C<content> method in Distribution::Locally|/type/Distribution::Locally#method_content>.
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.rakumod>
or C<resources/foo.txt>.
=end pod
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6