Re: associated_class in Moose::Util::MetaRole attribute_metaclass_role not returning consuming class

2009-07-03 Thread Hans Dieter Pearcey
On Sat, Jul 04, 2009 at 12:31:35AM +0100, Mark Morgan wrote: > In my case, I'm attempting to ensure that only a single attribute is > marked as 'asdf' for a given class. The specified attribute would be > treated specially during constuction package My::Meta::Attribute::Trait::Highlander; use

Re: associated_class in Moose::Util::MetaRole attribute_metaclass_role not returning consuming class

2009-07-03 Thread Stevan Little
Mark, I suspect you want a custom meta-class as well as a custom meta- attribute then. I don't know if you can accomplish this only using the attribute sub-protocol alone. - Stevan On Jul 3, 2009, at 7:31 PM, Mark Morgan wrote: In my case, I'm attempting to ensure that only a single attri

Re: associated_class in Moose::Util::MetaRole attribute_metaclass_role not returning consuming class

2009-07-03 Thread Mark Morgan
In my case, I'm attempting to ensure that only a single attribute is marked as 'asdf' for a given class. The specified attribute would be treated specially during constuction To be more precise, I'm looking at creating a module to allow capturing all arguments that are not defined within init_arg'

Re: associated_class in Moose::Util::MetaRole attribute_metaclass_role not returning consuming class

2009-07-03 Thread Dave Rolsky
On Fri, 3 Jul 2009, Mark Morgan wrote: has asdf => ( is => 'ro', trigger => sub { my ( $self, $value ) = @_; printf( "In trigger, assosciated class = %s\n", $self->associated_class ); }, ); This trigger gets called when the attribute is first crea

MX modules which warn with recent Mooses

2009-07-03 Thread Dave Rolsky
These modules spit out warnings in their test suite with the most recent release of Moose. For many of them, the fix will be to actually change their attribute metaclass to have proper attributes for any new options they accept. Others may need an - is => 'bare' MooseX::App::Cmd MooseX::Att

associated_class in Moose::Util::MetaRole attribute_metaclass_role not returning consuming class

2009-07-03 Thread Mark Morgan
Heya folks, Sorry in-advance for the long post, but it's the minimal amount of code that I could demonstrate this issue... When creating a new MooseX extension, within a rolled-in attribute, I'm unable to use associated_class method to get the consuming class (well, it succeeds, but returns undef