On Fri, 2009-01-02 at 17:08 +0100, [email protected] 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),
);
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).
Also, in Perl 5 taint is tri-valued, because it has a warnings-only
mode. How will that be supported by Perl 6?
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 ....
-'f