Bug#764621: perl: Please add support for Getopt::Long bundling_values or similar

Guillem Jover guillem at debian.org
Thu Oct 9 16:31:33 UTC 2014


Package: perl
Version: 5.20.1-1
Severity: wishlist
Tags: upstream

Hi!

The dpkg-dev perl scripts have an inconsistent diversity of command-line
option and command formats. Some use Getopt::Long, many use ad-hoc
parsing. Some support long and short options, some only short, some
support all or a subset of the following:

 -o
 -o value
 -ovalue
 --option
 --option value
 --option=value
 --optionvalue (!, but I should just get rid of this one)

I'd like to eventually unify them all by using Getopt::Long. But to
support the above 6 (sane) variants for backward compatibility, I'd
have to enable bundling, which I think is not a very good idea, as it's
not future proof, because if users can bundle options then adding
support for values to an existing option breaks those invocations.

Bundling values (for short options) should always be safe, but there's
currently no way to only enable value bundling, which is what I'm missing.
I guess I'll have to write my own option parser or Getopt::Long wrapper,
due to only wanting to use modules and perl versions available from
oldstable, but it'd be nice to be able to eventually get rid of it.

I'd like to have a new bundling_values option, that given the following
option specifiers:

 o=s
 x
 y

would not allow any of:

 -xy -xovalue -xo value

only:

 -x -y -ovalue -o value

which are always safe and future proof.

Thanks,
Guillem




More information about the Perl-maintainers mailing list