File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,20 @@ to a type of package declared with the C<module> keyword (see example
19
19
below) but here we mostly mean "module" as a set of source
20
20
files in a namespace.
21
21
22
+ = head2 Basic Structure
23
+
24
+ Module distributions in Perl 6 have the same stucture as any distribution in
25
+ the Perl family of languages: there is a main project directory containing
26
+ a C < README > and C < LICENSE > file, a C < lib > directory for modules, a C < t >
27
+ directory for tests, and possibly a C < bin > directory for executable programs
28
+ and scripts.
29
+
30
+ Module files generally use the standard C < .pm > extension, and scripts or
31
+ executables use C < .pl > . However, if you wish to highlight that the file is
32
+ written in Perl 6 you can use the C < .pm6 > extension for modules, and the
33
+ C < .p6 > extension for scripts. Test files still use the normal C < .t >
34
+ extension.
35
+
22
36
= head2 Loading and Basic Importing
23
37
24
38
Loading a module makes the packages declared within available in the
@@ -286,3 +300,5 @@ C<use Vortex::TotalPerspective>, and your Perl 6 implementation will
286
300
know where to look for the module file(s).
287
301
288
302
= end pod
303
+
304
+ # vim: expandtab shiftwidth=4 ft=perl6
You can’t perform that action at this time.
0 commit comments