|
Perl 6
SMOP Prelude Lexical Scope: Revision 2
Differently from Perl 5, in Perl 6 packages are not always global. The lookup for a particular package name always traverses the lexical scope hierarchy (unless explicitly with the GLOBAL package upfront (or its synonym "*"). The same happens for every Perl 6 operator.
This means that on the top of the scope hierarchy there should be a special scope, that will be the ultimate root of every lexical scope and will provide the "Perl 6 Prelude" as symbols that can be subject to lexical lookup. ^^ What does the Prelude Lexical Scope defines? * Bootstrap types ** SMOP::S1P::Code ** SMOP::S1P::map ** SMOP::S1P::for ** SMOP::S1P::Array * Built-in types * Built-in operators * Built-in grammars |