Subject: | init_arg is ignored |
MooseX::GetOpt seems to be ignoring init_arg. Running the sample script without args demonstrates that init_arg is being ignored. I've also got a gist for the same example here https://gist.github.com/oalders/e8dd74c0cf19744aed39
Subject: | init-arg.pl |
package Foo;
use Moose;
with 'MooseX::Getopt';
has foo => (
is => 'ro',
isa => 'Int',
init_arg => 'bar',
required => 1,
documentation => 'foo has init_arg of bar',
);
sub run {
my $self = shift;
print $self->foo;
}
__PACKAGE__->meta->make_immutable();
1;
package main;
Foo->new_with_options->run();