Re: Can't specify trait option when a role consumer modifies an attribute?

2009-08-20 Thread Hans Dieter Pearcey
Excerpts from Elliot Shank's message of Wed Aug 19 21:26:43 -0700 2009: > If you uncomment the one line in the code below, you get a "Illegal inherited > options => (getopt_name)" error. Is there any way around this? > > has '+modified_attribute' => ( > traits => [ qw< MooseX::Getopt::Def

Re: Can't specify trait option when a role consumer modifies an attribute?

2009-08-19 Thread Jesse Luehrs
On Thu, Aug 20, 2009 at 12:53:17AM -0400, Chris Prather wrote: > On Thu, Aug 20, 2009 at 12:26 AM, Elliot Shank wrote: > > If you uncomment the one line in the code below, you get a "Illegal > > inherited options => (getopt_name)" error.  Is there any way around this? > > Yes, but it isn't pretty.

Re: Can't specify trait option when a role consumer modifies an attribute?

2009-08-19 Thread Chris Prather
On Thu, Aug 20, 2009 at 12:26 AM, Elliot Shank wrote: > If you uncomment the one line in the code below, you get a "Illegal > inherited options => (getopt_name)" error.  Is there any way around this? Yes, but it isn't pretty. Moose::Meta::Attribute defines a set of "legal_options_for_inheritance",

Can't specify trait option when a role consumer modifies an attribute?

2009-08-19 Thread Elliot Shank
If you uncomment the one line in the code below, you get a "Illegal inherited options => (getopt_name)" error. Is there any way around this? use Moose::Role; has role_option => ( traits => [ qw< MooseX::Getopt::Defanged::Option > ], is => 'rw', isa => 'Str'