I can't explain why it's not catching the -k parameter. I tried it with similar result. There is one interesting thing I discovered when I dumped the object through Data::Dumper though: The paramaters '-k' and 'foo' are enumerated in @{$args->{_internal}{unused}}. So we know they were in @ARGV to begin with, and that Getopt::Declare found them, but the module doesn't seem to be using them.
I like what Damian Conway says in the docs under the BUGS section: "If nothing else, it shouldn't take 1500 lines to explain a package that was designed for intuitive ease of use!"
Dave
In reply to Re: Getopt::Declare not working
by davido
in thread Getopt::Declare not working
by cprice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |