Author: lwall
Date: 2009-09-29 23:05:11 +0200 (Tue, 29 Sep 2009)
New Revision: 28506

Modified:
   docs/Perl6/Spec/S06-routines.pod
   docs/Perl6/Spec/S11-modules.pod
Log:
[S06,S11] kill infix:<defines>, replace with statement_control:<import>


Modified: docs/Perl6/Spec/S06-routines.pod
===================================================================
--- docs/Perl6/Spec/S06-routines.pod    2009-09-29 19:45:52 UTC (rev 28505)
+++ docs/Perl6/Spec/S06-routines.pod    2009-09-29 21:05:11 UTC (rev 28506)
@@ -289,7 +289,7 @@
 you may play aliasing tricks like this:
 
     module B {
-        GLOBAL defines <&saith $next_id>;
+        import GLOBAL <&saith $next_id>;
         saith($next_id);    # Unambiguously the global definitions
     }
 

Modified: docs/Perl6/Spec/S11-modules.pod
===================================================================
--- docs/Perl6/Spec/S11-modules.pod     2009-09-29 19:45:52 UTC (rev 28505)
+++ docs/Perl6/Spec/S11-modules.pod     2009-09-29 21:05:11 UTC (rev 28506)
@@ -154,14 +154,14 @@
 in different scopes is likely to lead to confusion.)
 
 The C<use> declaration is actually a composite of two other declarations,
-C<need> and C<defines>.  Saying
+C<need> and C<import>.  Saying
 
     use Sense <common @horse>;
 
 breaks down into:
 
     need Sense;
-    Sense defines <common @horse>;
+    import Sense <common @horse>;
 
 These further break down into:
 
@@ -232,18 +232,18 @@
         multi fact (Int $n) is export { [*] 1..$n }
     }
     ...
-    Factorial defines 'fact';   # imports the multi
+    import Factorial 'fact';   # imports the multi
 
 The last declaration is syntactic sugar for:
 
     BEGIN MY.import_alias(Factorial, <fact>);
 
-Despite having the form of an infix operator, this form functions as
-a compile-time declarator, so that these notations can be combined:
+This form functions as a compile-time declarator, so that these
+notations can be combined by putting a declarator in parentheses:
 
-    role Silly {
+    import (role Silly {
         enum Ness is export <Dilly String Putty>;
-    } defines <Ness>;
+    }) <Ness>;
 
 This really means:
 
@@ -254,6 +254,8 @@
         <Ness>
     );
 
+Without an import list, C<import> imports the C<:DEFAULT> imports.
+
 =head1 Runtime Importation
 
 Importing via C<require> also installs names into the current lexical scope by
@@ -310,8 +312,8 @@
 You may also import symbols from the various pseudo-packages listed in S02.
 They behave as if all their symbols are in the C<:ALL> export list:
 
-    CONTEXT defines <$IN $OUT $ERR>;
-    CALLER defines <$x $y>;
+    import CONTEXT <$IN $OUT $ERR>;
+    import CALLER <$x $y>;
 
     # Same as:
     #     my ($IN, $OUT, $ERR) ::= ($*IN, $*OUT, $*ERR)
@@ -381,7 +383,7 @@
     class Dog:auth<http://www.some.com/~jrandom>:ver<1.2.1>;
     class Dog:auth<mailto:jran...@some.com>:ver<1.2.1>;
 
-Since these are somewhat unwieldy to look at, we allow a shorthand in
+Since these are somewhat unweildy to look at, we allow a shorthand in
 which a bare subscripty adverb interprets its elements according to their
 form:
 

Reply via email to