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

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',

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 Shankp...@galumph.com 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

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 Shankp...@galumph.com 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