develooper Front page | perl.perl5.porters | Postings from September 2016

Re: [perl #127885] [patches] enhance to test same perlunder different options/args

Thread Previous | Thread Next
Aristotle Pagaltzis
September 27, 2016 15:42
Re: [perl #127885] [patches] enhance to test same perlunder different options/args
Message ID:
* Dave Mitchell <> [2016-09-27 17:12]:
> The determination of what is a perl executable and what is an arg
> seems a bit haphazard. It seems to be: if it starts with a dash,
> assume its an arg, else try and execute it, and if it doesn't execute
> ok, assume its an arg? I don't like this at all. I'd much prefer it to
> be deterministic based on the command line's syntax, although I'm not
> sure what syntax. Perhaps args to perl should be part of the same arg
> as the executable name, e.g.
>     Porting/  \
>         'perlA+foo -perlA_arg1 -perlA_arg2' \
>         'perlB+bar -perlB_arg1 -perlB_arg2'
> although I guess that could run afoul of executable pathnames with spaces
> in them.

Seems obvious enough to me… how about this?

First, of all, benchmarking 3 perls, with no args possible, has
a shorthand that works just like before:

    Porting/ perlA perlB perlC

Then, if you need args, add --cmd to say so, and separate the command
lines with :: (as used by prove to pass args to test scripts):

    Porting/ \
        --cmd perlA -perlA_arg1 -perlA_arg2 \
        ::    perlB -perlB_arg1 -perlB_arg2

So the initial shorthand example can also be written longhand as

    Porting/ --cmd perlA :: perlB :: perlC

Does that work for you?

Aristotle Pagaltzis // <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About