Skip to content

Commit 3183417

Browse files
committed
Clarify about Distribution::Resource
Closes #3095
1 parent cf855f9 commit 3183417

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

doc/Language/modules.rakudoc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -783,10 +783,12 @@ C<META6.json>) so that the distribution path can be provided to the program.
783783
}
784784
=end code
785785

786-
The additional file can then be accessed inside module code:
786+
The additional file can then be accessed inside module code. Note the
787+
example here is returning a L<C<Distribution::Resource>|/type/Distribution::Resource> object. It should
788+
B<not> be considered as a path to an object in the filesystem.
789+
787790
=begin code
788791
my $template-text = %?RESOURCES<templates/default-template.mustache>.slurp;
789-
# Note that %?RESOURCES provides a C<IO> path object
790792
=end code
791793

792794
=end item
@@ -931,8 +933,11 @@ newer ones, use C<6.d> if it requires, at least the Diwali version.
931933
The C<resources> section is optional, but if present, should contain a list
932934
of the files in your C<resources> directory that you wish to be installed.
933935
These will be installed with hashed names alongside your library files.
934-
Their installed location can be determined through the C<%?RESOURCES> L<C<Hash>|/type/Hash>
935-
indexed on the name provided. The C<tags> section is also optional. It is used to describe
936+
B<Note>: Accessing these files via C<%?RESOURCES> is B<not>
937+
getting their installed locations or an L<C<IO>|/type/IO> class: You are accessing a L<C<Distribution::Resource>|/type/Distribution::Resource>.
938+
object indexed on the name provided.
939+
940+
The C<tags> section is also optional. It is used to describe
936941
the module in the Raku ecosystem.
937942

938943
The C<depends>, C<build-depends>, and C<test-depends> sections include different modules that

0 commit comments

Comments
 (0)