I am having problem getting Getopt::Declare (1.11) working. I have created the following code snippet to try and test a base case. I get no warnings or errors when I run my code with the '-k foo' option, but $args->{'-k'} never seems to be set. What am I doing wrong?
my $args = new Getopt::Declare <<'EOPARAM';
-k <value>
EOPARAM
if ( $args->{'-k'} )
{
print "Using value: ", $args->{'-k'}{'<value>'};
}