Subject: | command line option values which contain spaces are corrupted |
I'm using MooX::Cmd (0.008) and MooX::Options 4.005.
If a command line option value contains spaces, the content up to the first space is assigned to the option, and the rest is left on the command line for further processing. Example code:
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;
And the tests:
% perl topt2 --value '3 4 5'
value = 3
% perl topt2 --value '3 -4 -5'
Unknown option: 4
Thanks,
Diab