Subject: | MooseX::Getopt::Strict doesn't work with traits |
This is a feature request. MooseX::Getopt::Strict doesn't appear to work
if you use the traits feature.
# MyApp.pm
package MyApp;
use Moose;
with 'MooseX::Getopt::Strict';
has 'want_events' => (
# traits => [ 'Getopt' ],
isa => 'Bool',
is => 'ro',
default => 0,
cmd_flag => 'events',
metaclass => 'Getopt',
);
# myapp.pl --noevents
use MyApp;
my $app = MyApp->new_with_options();
# call as "myapp.pl --noevents" gives error "unknown option (noevents)"
I'd write a patch, but I don't know Class::MOP well enough. If you point
me in the right direction I'll be happy to read and try my hand at a patch.