Author: particle Date: 2009-01-09 03:07:28 +0100 (Fri, 09 Jan 2009) New Revision: 24822
Modified: docs/Perl6/Spec/S19-commandline.pod Log: [S19] delimited options use eager matching semantics, are invisible to MAIN, but are available via %+OPTS<...> Modified: docs/Perl6/Spec/S19-commandline.pod =================================================================== --- docs/Perl6/Spec/S19-commandline.pod 2009-01-09 01:02:25 UTC (rev 24821) +++ docs/Perl6/Spec/S19-commandline.pod 2009-01-09 02:07:28 UTC (rev 24822) @@ -275,8 +275,8 @@ =item * The opening and closing delimiters begin with two or more plus characters, -for example C<++>. You'll usually use two plus characters, but more are -allowed to disambiguate (more below). +for example C<++>. You'll usually use two plus characters, but more are +allowed to avoid ambiguity. {{TODO put more below, or refer to somewhere with more}} @@ -296,17 +296,24 @@ =item * +Eager matching semantics are used, so the first closing delimeter found +completes the match. + +=item * + Delimited options cannot be negated. =back -[From the P6 viewpoint, these options should probably be shoved into -context variables and be invisible to MAIN except as %+OPTS<PARSER> -or @+PARSER_ARGS or some such.] +These options are made available in context variables matching their name, +and are invisible to C<MAIN()> except as C<< %+OPTS<name> >>. For example: -{{TODO %+OPTS it is. explain this.}} + ++PARSER --prelude=Perl6-autoloop-no-print ++/PARSER +is available inside your script as C<< %+OPTS<PARSER> >>, and contains +C<--prelude=Perl6-autoloop-no-print>. + Values are parsed with the following rules: =over 4