Revision 27801

Date:
2009/07/29 17:59:03
Author:
lwall
Revision Log:
[S06] only add @_ and %_ to default sig if actually used in body
Files:

Legend:

 
Added
 
Removed
 
Modified
  • docs/Perl6/Spec/S06-routines.pod

     
    15 15
    16 16 Created: 21 Mar 2003
    17 17
    18 Last Modified: 26 Jun 2009
    19 Version: 110
    18 Last Modified: 29 Jul 2009
    19 Version: 111
    20 20
    21 21
    22 22 This document summarizes Apocalypse 6, which covers subroutines and the
     
    125 125
    126 126 sub foo {...}
    127 127
    128 This is equivalent to
    128 This is equivalent to one of:
    129 129
    130 sub foo () {...}
    131 sub foo (*@_) {...}
    132 sub foo (*%_) {...}
    130 133 sub foo (*@_, *%_) {...}
    131 134
    135 depending on whether either or both of those variables are used in the body of the routine.
    136
    132 137 Positional arguments implicitly come in via the C<@_> array, but
    133 138 unlike in PerlĀ 5 they are C<readonly> aliases to actual arguments:
    134 139