@@ -16,8 +16,8 @@ L<roles|/language/objects#Roles>, L<grammars|Grammar>),
16
16
L < subroutines|/language/functions > , and sometimes
17
17
L < variables|/language/variables > . In Perl 6 I < module > can also refer
18
18
to a type of package declared with the C < module > keyword (see example
19
- below) but here we mostly mean "module" as a set of useful source
20
- files in a well defined namespace.
19
+ below) but here we mostly mean "module" as a set of source
20
+ files in a namespace.
21
21
22
22
= head2 Loading and Basic Importing
23
23
@@ -31,7 +31,7 @@ exported available in the current lexical scope.
31
31
# loads and imports default symbols at compile time
32
32
use MyModule;
33
33
34
- # imports defualt symbols at compile time
34
+ # imports default symbols at compile time
35
35
import MyModule;
36
36
37
37
# loads module at runtime
@@ -88,9 +88,9 @@ tags: C<ALL>, C<DEFAULT> and C<MANDATORY>.
88
88
89
89
= head2 EXPORT
90
90
91
- You can arbitrarily export symbols with an C < EXPORT > sub. C < EXPORT >
91
+ You can export arbitrary symbols with an C < EXPORT > sub. C < EXPORT >
92
92
must return a L < EnumMap > , where the keys are the symbol names and
93
- the values are the symbol values. The names should include the sigil
93
+ the values are the desired values. The names should include the sigil
94
94
(if any) for the associated type.
95
95
96
96
= begin code
@@ -124,9 +124,10 @@ Note, C<EXPORT> can't be declared inside a package because
124
124
presently rakudo (2015.06) seems to treat C < EXPORT > as part of the
125
125
compunit rather than the package.
126
126
127
- C < EXPORT > gets passed positional arguments passed to C < use > . However
128
- if C < use > is passed an argument the module will no longer export
129
- default items.
127
+ If you pass positional parameters to C < use > they will be passed to
128
+ C < EXPORT > . The module no longer exports default symbols if a
129
+ positional is passed, however you may still import them explicitly by
130
+ passing :C < DEFAULT > to C < use > .
130
131
131
132
= begin code
132
133
# lib/MyModule
0 commit comments