Subject: | Aliased option names |
Date: | Sun, 25 Jun 2006 18:44:13 +0100 |
To: | bug-getopt-euclid [...] rt.cpan.org |
From: | Andrew Suffield <asuffield [...] suffields.me.uk> |
Getopt::Euclid is a nice idea, but for me there's one big thing
missing: the ability to specify several aliased forms for the same
option. Ideally I want to say something like this:
=over
=item -o <file>, --output [=] <file>
Write the output to this file
=for Euclid:
file.type: writeable
file.default: '-'
=back
=cut
Then I could run the program as 'foo -o out' or 'foo --output=out' or
whatever.
This is particularly important when you want to convert from an
existing argument parsing method, without changing the command-line
syntax (so -o[utput] is no good). My current workaround is to have
multiple =items for each one, but then I have to post-process %ARGV to
handle duplicates somehow, it doesn't work for required arguments, and
the --help and --man output is formatted in a less-than-ideal manner.