How can I provide an alternate init arg for an attribute in Moose?
问题 I of course know that I can rename the init arg for an attribute by setting init_arg (e.g) package Test { use Moose; has attr => ( is => 'ro', isa => 'Str', init_arg => 'attribute' ); } which would allow me to Test->new({ attribute => 'foo' }); but not Test->new({ attr => 'foo' }); at the same time MooseX::Aliases actually has this behavior, but creating an alias also creates accessors. I'm currently trying to understand the code in that module to see if I can't determine how it does it, so