/
Path.pod6
39 lines (23 loc) 路 1.01 KB
/
Path.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
=begin pod
=TITLE class Distribution::Path
=SUBTITLE Distribution::Path
class Distribution::Path does Distribution::Locally { }
A L<Distribution|/type/Distribution> implementation backed by the filesystem. It requires a
C<META6.json> file at its root.
=head1 Methods
=head2 method new
method new(IO::Path $prefix, IO::Path :$meta-file = IO::Path)
Creates a new C<Distribution::Path> instance from the C<META6.json> file found
at the given C<$prefix>, and from which all paths in the metadata will be
prefixed with. C<:$meta-file> may optionally be passed if a filename other than
C<META6.json> needs to be used.
=head2 method meta
method meta()
Returns a Hash with the representation of the metadata.
=head2 method content
L<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.pm6>
or C<resources/foo.txt>.
=end pod
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6