cmd line parsing emulating sv[kn]
dave at dave.org.uk
Thu Feb 2 10:24:10 GMT 2006
Paul Makepeace wrote:
> I have a script where I'd like to emulate svn's -r option. It goes like,
> -r 1676
> -r1676 (i.e. whitespace not significant)
> -r168:200 (I can probably manage to parse out the two numbers...)
> I've used Getopt::Long (since I know it) with GetOptions("r=s" => \$revs)
> but Go::L seems to require a space between switch & arg which is confusing
> for anyone using sv[kn].
> Any suggestions which module to use?
If you're only ever going to have single letter options then GetOpt::Std
seems to do all you want.
> Is there a Giant List of CPAN CLI Parsers and Their Features anywhere?
You can get a rather scary looking list from
I'm particularly worried by
More information about the london.pm