This bit of code in the _options_fix_argv routine of MooX::Options::Role strips leading and trailing quotes:
#remove the quoted if exist to chain
$_[0] =~ s/^['"]|['"]$//gx;
This is a problem when you want to preserve those quotes. A small example:
#!/usr/bin/env perl
package Test;
use Moo;
use MooX::Options;
option test => (
is => 'ro',
short => 't',
format => 's',
);
1;
package main;
my $t = Test->new_with_options;
print $t->test."\n";
Run the above:
./test.pl -t "This is 'a test'"
This is 'a test
When I would expect to see
as its output.
This bit of code in the _options_fix_argv routine of MooX::Options::Role strips leading and trailing quotes:
This is a problem when you want to preserve those quotes. A small example:
Run the above:
When I would expect to see
as its output.