raku-community-modules / raku-bench

Benchmark and compare Raku implementations against Perl
22 stars 12 forks source link

can't use anyother commandline arguments for `bench` #12

Closed chenryn closed 9 years ago

chenryn commented 9 years ago
multi MAIN ('time', *@components, :$variants?, :$tests?, :$tests-tagged?,
                                  :$runs?, :$enough-time?, :$min-scaling-points?,
                                  Bool :$verbose?) {

all arguments will exists in @components and then die with "Don't know how to process component '--verbose'"

japhb commented 9 years ago

This is because, unfortunately, perl6's default MAIN parsing requires all options (corresponding to named arguments in the signature) to appear before all positional arguments (which include the subcommand 'time' and the components). Anything after the first positional argument ('time' in this case) will be treated as positional, even if it's in the form of an option. Fixing this would require manual parsing, or (and this is what I'd much rather) a module that replaced the default Rakudo MAIN parsing with one that acted more like git's.

Closing this issue for now as fixing it really requires either a module as described above to be added to the ecosystem or convincing @Larry to change the default command argument parsing rules (and fixing Rakudo to match).

chenryn commented 9 years ago

Thank you, I leart how to verbose it now : bench --verbose time nqp-moar/2014.10 rakudo-moar/2014.10.