Skip Menu |

This queue is for tickets about the CLI-Framework CPAN distribution.

Report information
The Basics
Id: 70514
Status: new
Priority: 0/
Queue: CLI-Framework

People
Owner: Nobody in particular
Requestors: dgethings [...] juniper.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Download Archive.zip
application/zip 2k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #70514] AutoReply: App cache not initialise in C::F::Command
Date: Fri, 26 Aug 2011 17:33:49 +0100
To: <bug-CLI-Framework [...] rt.cpan.org>
From: David Gethings <dgethings [...] juniper.net>
Hi, I think I've found a fix for this bug. Looks like all you have to do is move line 471 to before line 454 in C::F::Application.pm. I gave that a try and that appears to meet my needs. No extensive testing has been done so I'm not sure if that breaks other stuff. On 26 Aug 2011, at 17:07, Bugs in CLI-Framework via RT wrote: Show quoted text
> > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "App cache not initialise in C::F::Command", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [rt.cpan.org #70514]. Your ticket is accessible > on the web at: > > https://rt.cpan.org/Ticket/Display.html?id=70514 > > Please include the string: > > [rt.cpan.org #70514] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > > Thank you, > bug-CLI-Framework@rt.cpan.org > > ------------------------------------------------------------------------- > 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 >
> > 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. >
> > 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 > > > >
-- Cheers Dg