Author: pmichaud Date: 2009-12-10 19:36:02 +0100 (Thu, 10 Dec 2009) New Revision: 29308
Modified: docs/Perl6/Spec/S11-modules.pod Log: [S11]: 'import' is syntactic sugar for .EXPORTALL, not .import_alias . Modified: docs/Perl6/Spec/S11-modules.pod =================================================================== --- docs/Perl6/Spec/S11-modules.pod 2009-12-10 17:09:51 UTC (rev 29307) +++ docs/Perl6/Spec/S11-modules.pod 2009-12-10 18:36:02 UTC (rev 29308) @@ -224,7 +224,7 @@ } =head2 Importing without loading -X<defines> +X<import> The importation into your lexical scope may also be a separate declaration from loading. This is primarily useful for modules declared inline, which @@ -238,7 +238,7 @@ The last declaration is syntactic sugar for: - BEGIN MY.import_alias(Factorial, <fact>); + BEGIN Factorial.WHO.EXPORTALL(MY, 'fact'); This form functions as a compile-time declarator, so that these notations can be combined by putting a declarator in parentheses: @@ -249,13 +249,11 @@ This really means: - BEGIN MY.import_alias( - role Silly { - enum Ness is export <Dilly String Putty>; - }, - <Ness> - ); + BEGIN (role Silly { + enum Ness is export <Dilly String Putty>; + }).WHO.EXPORTALL(MY, <Ness>) + Without an import list, C<import> imports the C<:DEFAULT> imports. =head1 Runtime Importation