On Wed, Oct 17, 2012 at 12:31 AM, Tomas Doran <bobtf...@bobtfish.net> wrote:
> > > > > Is it possible to add a modifier like that? > > > Yes, but you probably don't want to. > > It's almost certainly better to apply a request role. Have a look at the > changes I did to C::P::UploadProgress: > Yes, I think that's a better approach. But, you added some hooks in Catalyst to make it possible. But, I'd still like to understand Moose a bit better, and this is a good example. Granted may not be appropriate in this case, but I'd like to understand how to programmatically add a method modifier like in my original message. I didn't get far looking at the Class::MOP::Method docs. (I'm also a bit curious how that's different than monkey patching.) And more specific to this problem: I'm a bit lost by this code -- Is that to get at the require_class_accessor attribute? Or is there a reason you cannot use "with"? Class::MOP::class_of('MooseX::RelatedClassRoles') ->apply($c->meta, name => 'request', require_class_accessor => 0); Thanks, -- Bill Moseley mose...@hank.org