Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MooX-Options CPAN distribution.

Report information
The Basics
Id: 91480
Status: resolved
Priority: 0/
Queue: MooX-Options

People
Owner: Nobody in particular
Requestors: djerius [...] cpan.org
Cc:
AdminCc:

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



Subject: Short options cannot be separated from their value
Hi, The attached zip file contains an app which uses MooX::Cmd (0.008) with MooX::Options (4.005). The subcommand 'doit' defines an option value with a short form 'v'. These work: % perl topt2 doit --value 3 $VAR1 = '3'; % perl topt2 doit -v3 $VAR1 = '3'; This doesn't: % perl topt2 doit -v 3 Option v requires an argument USAGE: topt2 [-hv] [long options...] [...] Thanks, Diab
Subject: cmd.zip
Download cmd.zip
application/zip 1k

Message body not shown because it is not plain text.

On Tue Dec 17 14:51:04 2013, DJERIUS wrote: Show quoted text
> Hi, > > The attached zip file contains an app which uses MooX::Cmd (0.008) > with MooX::Options (4.005). > The subcommand 'doit' defines an option value with a short form 'v'. > > These work: > > % perl topt2 doit --value 3 > $VAR1 = '3'; > > % perl topt2 doit -v3 > $VAR1 = '3'; >
Well, that was silly of me. Here's a much shorter test case all in one file: package MyApp; use Moo; use MooX qw[ Cmd Options ]; option value => ( short => 'v', is => 'ro', format => 's', ); sub execute { my $self = shift; print "value = ", $self->value, "\n"; } package main; MyApp->new_with_cmd;
On Tue Dec 17 14:51:04 2013, DJERIUS wrote: Show quoted text
> These work: > > % perl topt2 doit --value 3 > $VAR1 = '3'; > > % perl topt2 doit -v3 > $VAR1 = '3'; > > > This doesn't: > > % perl topt2 doit -v 3 > Option v requires an argument > USAGE: topt2 [-hv] [long options...] > [...]
This seems to have been fixed with the latest version of MooX::Options (4.006): % pmvers MooX::Options 4.006 % perl topt2 doit --value 3 value = 3 So this isn't a bug in MooX::Cmd. Sorry for the noise. Diab
On Wed Dec 18 10:45:21 2013, DJERIUS wrote: Show quoted text
> On Tue Dec 17 14:51:04 2013, DJERIUS wrote:
> > These work: > > > > % perl topt2 doit --value 3 > > $VAR1 = '3'; > > > > % perl topt2 doit -v3 > > $VAR1 = '3'; > > > > > > This doesn't: > > > > % perl topt2 doit -v 3 > > Option v requires an argument > > USAGE: topt2 [-hv] [long options...] > > [...]
> > > This seems to have been fixed with the latest version of MooX::Options > (4.006): > > % pmvers MooX::Options > 4.006 > % perl topt2 doit --value 3 > value = 3
Bad cut'n'paste. That test should have been: % perl topt2 doit -v 3 value = 3
Hi Celogeek, I hand this ticket over to you (even if I know that it's fixed already). For documentation purposed mark it as closed/fixed in 4.xyz. Cheers, Sno
Yeah, this should be fixed in the latest version. try it and post back if you still have issue