Subject: | using =s% return undefined hash values |
With this example code I get undefined hash keys as one can see in the debug output...
use AppConfig;
use Data::Dumper;
# create a new AppConfig object
my $config = AppConfig->new();
# define a new variable
$config->define("define=s%");
$config->getopt();
print Dumper($config->get("define"));
runnning the code with debug enabled:
% perl testing/app.pl --define dd=sdfd
Variable defined:
define
VALUE => HASH(0x81ec328)
DEFAULT => <undef>
ARGCOUNT => 3
VALIDATE => <undef>
ACTION => <undef>
EXPAND => <undef>
Calling GetOptions(define=s%, CODE(0x82a4d88))
@ARGV = (--define, dd=sdfd)
AppConfig::State=HASH(0x81ec214)->set(define, dd)
AppConfig::State=HASH(0x81ec214)->get(define) => HASH(0x81ec328)
$VAR1 = {
'dd' => undef
};
A bug, or am I doing osmething wrong?