Skip to content

Commit 33b9276

Browse files
committed
small touch ups and sentence rewrites on modules
1 parent 53189e2 commit 33b9276

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lib/Language/modules.pod

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ L<roles|/language/objects#Roles>, L<grammars|Grammar>),
1616
L<subroutines|/language/functions>, and sometimes
1717
L<variables|/language/variables>. In Perl 6 I<module> can also refer
1818
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.
2121
2222
=head2 Loading and Basic Importing
2323
@@ -31,7 +31,7 @@ exported available in the current lexical scope.
3131
# loads and imports default symbols at compile time
3232
use MyModule;
3333
34-
# imports defualt symbols at compile time
34+
# imports default symbols at compile time
3535
import MyModule;
3636
3737
# loads module at runtime
@@ -88,9 +88,9 @@ tags: C<ALL>, C<DEFAULT> and C<MANDATORY>.
8888
8989
=head2 EXPORT
9090
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>
9292
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
9494
(if any) for the associated type.
9595
9696
=begin code
@@ -124,9 +124,10 @@ Note, C<EXPORT> can't be declared inside a package because
124124
presently rakudo (2015.06) seems to treat C<EXPORT> as part of the
125125
compunit rather than the package.
126126
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>.
130131
131132
=begin code
132133
# lib/MyModule

0 commit comments

Comments
 (0)