Author: lwall Date: 2009-02-01 17:25:33 +0100 (Sun, 01 Feb 2009) New Revision: 25156
Modified: docs/Perl6/Spec/S02-bits.pod docs/Perl6/Spec/S19-commandline.pod Log: move away from "prelude" towards "setting" establish LANG lexical scope to indicate setting define --language or -L to set LANG dsl Modified: docs/Perl6/Spec/S02-bits.pod =================================================================== --- docs/Perl6/Spec/S02-bits.pod 2009-02-01 15:17:26 UTC (rev 25155) +++ docs/Perl6/Spec/S02-bits.pod 2009-02-01 16:25:33 UTC (rev 25156) @@ -1763,7 +1763,8 @@ MY # Lexical symbols declared in the current scope OUR # Package symbols declared in the current package FILE # Lexical symbols in this file's outermost scope - PERL # Lexical symbols in the standard "perlude" + PERL # Lexical symbols in the standard setting + LANG # Lexical symbols in current dsl (usually PERL) GLOBAL # Interpreter-wide package symbols PROCESS # Process-related globals (superglobals) SUPER # Package symbols declared in inherited classes @@ -1779,10 +1780,15 @@ Other all-caps names are semi-reserved. We may add more of them in the future, so you can protect yourself from future collisions by using mixed case on your top-level packages. (We promise not to break -any existing top-level CPAN package, of course. Except maybe ACME, +any existing top-level CPAN package, of course. Except maybe C<ACME>, and then only for coyotes.) -Note that FILE::OUTER is usually, but not always, PERL. +The C<LANG> scope is equivalent to C<FILE::OUTER>. For a standard Perl +program C<LANG> is the same as C<PERL>, but various startup options +(such as C<-n> or C<-p>) can put you into a domain specific language, +in which case C<PERL> remains the scope of the standard language, +while C<LANG> represents the scope defining the DSL that functions +as the setting of the current file. =item * Modified: docs/Perl6/Spec/S19-commandline.pod =================================================================== --- docs/Perl6/Spec/S19-commandline.pod 2009-02-01 15:17:26 UTC (rev 25155) +++ docs/Perl6/Spec/S19-commandline.pod 2009-02-01 16:25:33 UTC (rev 25156) @@ -14,8 +14,8 @@ Maintainer: Jerry Gay <jerry....@rakudoconsulting.com> Date: 12 Dec 2008 - Last Modified: 9 Jan 2009 - Version: 15 + Last Modified: 1 Feb 2009 + Version: 16 This is a draft document. This document describes the command line interface. It has changed extensively from previous versions of Perl in order to increase @@ -324,10 +324,10 @@ These options are made available in context variables matching their name, and are invisible to C<MAIN()> except as C<< %+OPTS<name> >>. For example: - ++PARSER --prelude=Perl6-autoloop-no-print ++/PARSER + ++PARSER --setting=Perl6-autoloop-no-print ++/PARSER is available inside your script as C<< %+OPTS<PARSER> >>, and contains -C<--prelude=Perl6-autoloop-no-print>. Since eager matching is used, if you +C<--setting=Perl6-autoloop-no-print>. Since eager matching is used, if you need to pass something like: ++foo -bar ++foo baz ++/foo ++/foo @@ -478,7 +478,7 @@ =item --autoloop-no-print, -n Act like awk. Desugars to -C<++PARSER --prelude=Perl6-autoloop-no-print ++/PARSER>. +C<++PARSER --setting=Perl6-autoloop-no-print ++/PARSER>. =item --output-format, -O *format* @@ -497,8 +497,15 @@ =item --autoloop-print, -p Act like sed. Desugars to -C<++PARSER --prelude=Perl6-autoloop-print ++/PARSER>. +C<++PARSER --setting=Perl6-autoloop-print ++/PARSER>. +=item --language, -L *dsl* + +Set the domain specific language for parsing the script file. (That is, +specify the I<setting> (often known as the prelude) for the program.) +C<++PARSER --setting=*dsl* ++/PARSER>. + + =item --search-path, -S Use PATH environment variable to search for script specified on command-line. @@ -608,6 +615,6 @@ Sandboxing? maybe-r Env var? maybe -E. -Could be posed in terms of substituting a different prelude. +Could be posed in terms of substituting a different setting. =for vim:set expandtab sw=4: