I've tried to do a similar thing with Getopt::Long and others, but it never worked out nicely. There's always duplicate data, and it's hard to keep the comments in synch with the options. Getopt::Declare updates the options when I change the usage statement.
I created a toy example for -x accepts up to 3 additional arguments at Re: -x accepts up to 3 additional arguments.
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re: deriving usage from Getopts::Long
by QM
in thread deriving usage from Getopts::Long
by Random_Walk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |