Subject: | App cache not initialise in C::F::Command |
Date: | Fri, 26 Aug 2011 17:06:13 +0100 |
To: | <bug-CLI-Framework [...] rt.cpan.org> |
From: | David Gethings <dgethings [...] juniper.net> |
Hi,
I really like the framework. Unfortunately I've discovered a bug that is preventing me from using the framework as I would like.
The problem is with the cache. It looks like when using option_spec hook in CLI::Framework::Command the cache is not initialised. Here's an output from the perl debugger:
main::(conf.pl:4): Configure->run();
DB<1> c 72
Configure::Platform::option_spec(conf.pl:72):
72: [ 'ifd=s' => 'Physical interface' ],
73: [ 'mtu=s' => 'MTU for physical interface' ],
DB<2> p $_[0]->cache->get('platform')
Can't call method "get" on an undefined value at (eval 49)[/System/Library/Perl/5.10.0/perl5db.pl:638] line 2.
DB<3> c 77
Configure::Platform::run(conf.pl:77):
77: my ($self, $opt, @args) = @_;
DB<4> p $_[0]->cache->get('platform') DB<4> c 77
asbr
DB<5>
Attached is a zip containing the script and supporting files needed for the script to run. Here's some further info about my setup:
Module: CLI-Framework-0.05
Show quoted text
> perl -v
This is perl, v5.10.0 built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2007, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Show quoted text> uname -a
Darwin dgethings-mbp.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
--
Cheers
Dg
Message body not shown because it is not plain text.