MooseX::MultiInitArg
[email protected] (Paul Driver)
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <[email protected]> |
MX::MultiInitArg is in Moose's subversion repository, and should be hitting CPAN shortly (it's been uploaded to PAUSE). Now you can make aliases for your init_args. has widget => ( is => 'ro', init_args => [qw(twiddler fiddler)], ); So these are all equivalent: ->new(twiddler => 'whatever') ->new(fiddler => 'whatever') ->new(widget => 'whatever') and this: ->new(widget => 'foo', fiddler => 'bar') makes it confess its sins to you.