in reply to Re: generic getopt to hash
in thread generic getopt to hash
It made be curious enough to ask the author himself for clarification wrt code vs docs. Here's part of Johans reply to me:
> /me
> According to my reading of the 2.38 docs however, the --list option
> should have eaten -v as well, as it states that args can start with
> - or --. Which I'd take to mean that all further elements in @ARGV
> are eaten by --list.
/johan
Args can start with -/-- only if mandatory. list=s@{,} allows for
many arguments, but does not require them. list=s@{,4} would *require*
4 arguments and eat -/-- args if necessary.
He also pointed me to !FINISH to help with stopping option parsing early. Together with ::Long's option aliasing, this should suffice to replace some of my looping thru @ARGV to massage arguments before getopt :).
Thanx to Johan & Beth for her excellent example above!
|
|---|