On Fri, Jan 2, 2009 at 09:27, Geoffrey Broadwell <ge...@broadwell.org> wrote: > On Fri, 2009-01-02 at 17:08 +0100, pugs-comm...@feather.perl6.nl wrote: >> +=head2 Synopsis >> + >> + multi sub perl6( >> + Bool :a($autosplit), >> + Bool :c($check-syntax), >> + Bool :$doc, >> + :e($execute), >> + :$execute-lax, #TODO fix illegal -e6 syntax. -6? not legal. -x? hrmm >> + Bool :F($autoloop-split), >> + Bool :h($help), >> + :I(@include), >> + #TODO -M, >> + Bool :n($autoloop-no-print), >> + :O($output-format) = 'exe', >> + :o($output-file) = $*OUT, >> + Bool :p($autoloop-print), >> + :S(@search-path), >> + Bool :T($taint), >> + Bool :v($version), >> + Bool :V($verbose-config), >> + ); > > I find this a little difficult to skim, because parallel things are not > aligned. Aligning on ':' should make things much easier on the eyes: > > multi sub perl6( > Bool :a($autosplit), > Bool :c($check-syntax), > Bool :$doc, > :e($execute), > :$execute-lax, > Bool :F($autoloop-split), > Bool :h($help), > :I(@include), > #TODO -M, > Bool :n($autoloop-no-print), > :O($output-format) = 'exe', > :o($output-file) = $*OUT, > Bool :p($autoloop-print), > :S(@search-path), > Bool :T($taint), > Bool :v($version), > Bool :V($verbose-config), > ); > thanks, done.
> Ah, that's a bit better. Looking at the above, is $execute-lax supposed > to be a boolean, or is it really a generic scalar? It's also not > obvious what a boolean named $doc does -- which probably means either > that it's not supposed to be a boolean, or it needs a somewhat more > descriptive long name (or both). > --execute-lax is gone, since -e6 is just an idiomatic shortcut for --execute '6', which is outlined in Synopsis 11. > Also, in Perl 5 taint is tri-valued, because it has a warnings-only > mode. How will that be supported by Perl 6? > well, perl 5 uses two flags for this, and i'm as yet undecided what to do about it.one argument is that i should keep the syntax from perl 5 consistent where possible. another argument is that taint warnings mode is relatively unused (and for development only) so doesn't deserve its own flag. maybe -t goes away, and -T takes a param that defaults to C<TaintException> but can be set to something like C<TaintException does Resumable>. > Finally, how do the defaults of $output-file and $output-format interact > so that the default behavior remains compile-and-execute? Changing the > default to compile-to-exe seems unperlish to me .... > i've gotten rid of default values for these options. they're strictly implementation-dependent. the syntax exists to allow rakudo to emit pbc files, and pugs to emit javascript, and i think is flexible enough for other implementations. maybe i'll remove them entirely, since they are implementation-dependent and can be done with ++metasyntax. in any case, the default behavior of perl 6 is unchanged from perl 5, which is compile-and-execute. ~jerry