Re: Dynamically apply a role to a class

2010-05-09 Thread Mike Friedman
Guys, Thanks for the responses. On Sun, May 9, 2010 at 7:29 AM, Jesse Luehrs d...@tozt.net wrote: So... is there a reason that using 'with' in the class definition isn't sufficient? (The subject line mentions runtime application, but your code sample below is a Moose::Exporter package, which

Re: Dynamically apply a role to a class

2010-05-09 Thread Christopher Brown
Hi, I think that this is a related question. I seem to be grappling with similar things that Mike is. ( No not the alcohol or the lack of sleep. ) What I want to do provide a consuming class with a a) a meta-attribute (via a trait). b) methods to the meta-class. I think the answer is to

Re: Dynamically apply a role to a class

2010-05-09 Thread Christopher Brown
Sorry. Pressed send by accident: Let me complete my thought. What I want to do provide a consuming class with a a) a meta-attribute (via a trait, 'My::MetaAttribute::Role' ) b) methods to the meta-class. ( My::MetaClass::Role' ). I think the answer is to use Moose::Exporter and/or