[Chicago-talk] alternatives to Getopt::Long
wiggins at danconia.org
Sun May 9 16:26:04 CDT 2004
Steven Lembark wrote:
> -- Mike Fragassi <frag at ripco.com>
>> On Sat, 8 May 2004, Steven Lembark wrote:
>>> >> There is now way for it to know that "a b c" is an argument.
>>> > But why not? You can already do
>>> Show me a *NIX shell that does not split its arguments
>>> on whitespace. If you run the perl code on it then your
>>> arguments won't be separated in @ARGV.
>> The point is not to prevent @AGRV from being split on \s+, the point is
>> that the @ARGV processor could assign multiple values to the designated
>> array until it reaches the next switch.
> How would you handle:
> foo --bar bletch blort blam;
> with "blam" being the first program argument, bletch and blort
> being arguments to the --bar switch? Or deal gracefully with
> single-dash switches:
Well that is where the -- argument I made earlier comes in, but
personally as a user I would find it harder to remember to add that then
the extra typing.
> foo -bletch -b blort blam;
> let alone combined ones.
> If you can figure out a reliable way to handle this that doesn't
> involve more typing than multiple use of the switches feel free,
> but the existing system exists largely because noone has found
> any really better one.
This is kind of what I was trying to get at, but the newer explanations
have definitely done a better job of it :-)....
More information about the Chicago-talk