Subject: | init_arg default and required. |
If you want to establish an interface
package Base;
use Moose::Role;
has 'foo' => ( isa => 'Str', is => 'ro', init_arg => undef, required =>
1 );
You can't currently
has '+foo' => ( default => 'Bar' );
because you'll get
You cannot have a required attribute (_action) without a default,
builder, or an init_arg at
/usr/local/lib/perl/5.14.2/Moose/Meta/Attribute.pm line 485
It should look to see if the attribute set is modified when composed.
--
Evan Carroll
System Lord of the Internets
http://www.evancarroll.com