File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,15 @@ directory for executable programs and scripts.
49
49
Source files generally use the C < .pm6 > extension, and scripts or
50
50
executables use the C < .p6 > . Test files use the C < .t > extension. Files which contain documentation use the C < .pod6 > extension.
51
51
52
+ X < |compunit >
52
53
= head2 Loading and Basic Importing
53
54
54
55
Loading a module makes the packages in the same namespace declared
55
56
within available in the file scope of the loader. Importing from a
56
57
module makes the symbols exported available in the lexical scope of
57
58
the importing statement.
58
59
59
- = head3 X < need|compunit >
60
+ = head3 C < need > X < |need >
60
61
61
62
C < need > loads a C < compunit > at compile time.
62
63
@@ -76,7 +77,7 @@ C<MyModule::Class> will be defined when C<MyModule> is loaded.
76
77
77
78
= comment class Class { ... } won't get exported automatically on loading...not sure if bug or..
78
79
79
- = head3 X < use|compunit >
80
+ = head3 C < use > X < |use >
80
81
81
82
C < use > loads and then imports from a compunit at compile time. It will look for
82
83
files that end in C < .pm6 > (C < .pm > is also supported). See
@@ -95,7 +96,7 @@ import MyModule;
95
96
96
97
See also L < Selective Importing|/language/modules#Exporting_and_Selective_Importing > to restrict what you import.
97
98
98
- = head3 X < require|compunit >
99
+ = head3 C < require > X < |require >
99
100
100
101
C < require > loads a compunit and imports definite symbols at runtime.
101
102
Original file line number Diff line number Diff line change @@ -760,7 +760,7 @@ class or role, even after it has been redefined in the child class.
760
760
761
761
multi sub prefix:<++>($x is rw) is assoc<non>
762
762
763
- Increments its argument by one and returns the updated value.X < |increment operator >
763
+ Increments its argument by one and returns the updated value.X < |prefix increment operator >
764
764
765
765
my $x = 3;
766
766
say ++$x; # OUTPUT: «4»
@@ -789,7 +789,7 @@ semantics.
789
789
790
790
multi sub postfix:<++>($x is rw) is assoc<non>
791
791
792
- Increments its argument by one and returns the original value.X < |increment operator >
792
+ Increments its argument by one and returns the original value.X < |postfix increment operator >
793
793
794
794
my $x = 3;
795
795
say $x++; # OUTPUT: «3»
You can’t perform that action at this time.
0 commit comments