Andy Armstrong wrote: > On 29 Nov 2007, at 02:17, Michael G Schwern wrote: >> Why isn't this just: >> >> prove -v t/mytest.t --test_args='--url http://example.com' >> >> It's clear, it's unambiguous, it allows -- to mean what it's supposed >> to mean. > > > I agree re the semantics of '--' - but I'd rather have a sentinel than a > quoted string. Having to get nested quoting right is a bit of cognitive > load we can spare people from. > > So: > > * Andy's --testargs has the disadvantage of being visually indistinct > from regular args > * '--' has another meaning by convention > > How about some other short, not arg like, shell safe punctuation sequence? > > $ prove -v t/sprocket.t -+ --teeth 12
As Ovid would say, you're captaining the SS Make Shit Up. ;) Quoting and escaping arguments is something you eventually have to learn how to do with any shell. I'd rather have to deal with a known bit of common shell lore then some unrelated bit of funny punctuation unique to prove. Put another way, shell quoting is an O(1) learning situation. Funny little punctuation unique to each command is O(n). Pragmatically, do we expect to have lots of quoting in arguments being passed to test files? There's the additional problem that it restricts the test arguments to only be allowed at the end of the prove command line. This means switch ordering is important, which will lead to problems programmaticly constructing prove commands or chaining switches together without knowing what all the previous switches are. -- 'All anyone gets in a mirror is themselves,' she said. 'But what you gets in a good gumbo is everything.' -- "Witches Abroad" by Terry Prachett