|
Perl 6
SMOP Lexical Scope Implementation: Revision 1
One first hard step in implementing lexical scopes is to put together a lot of details that are spread over the specs. In this page we're going to sketch a model for the lexical scopes that support all the documented Perl 6 features.
^ Variable Lookup The local variable lookup happens in the following order: # MY # OUTER recursive ^ Special cases ^^ $_ $_ is always locally defined in any block. Routines start with an empty $_, other Code objects have a signature of: .pre -> $_ is rw = OUTER::<$_> .pre ^^ $! and $/ These variables are compile time aliases to $+! and $+/ |