cmd line parsing emulating sv[kn]

Aaron Crane perl at aaroncrane.co.uk
Thu Feb 2 10:25:27 GMT 2006


Paul Makepeace writes:
> 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].

It doesn't if you configure it to use bundling.  The simplest way to do
that is probably this:

  use Getopt::Long qw<GetOptions :config bundling>;

I personally prefer the UI you get from doing this:

  use Getopt::Long qw<GetOptions :config gnu_getopt>;

-- 
Aaron Crane


More information about the london.pm mailing list