Re: Roles, Classes and silent overriding

2009-04-15 Thread Hans Dieter Pearcey
On Tue, Apr 14, 2009 at 02:41:44PM -0400, Stevan Little wrote: around() (without calling the next method) would also work. That won't be detectable at composition time though. Well, if you didn't have the method, it would fail at around() time, so it would work in the sense that it would let

Re: Applying a role to an object instance

2009-04-15 Thread Chris Prather
On Tue, Apr 14, 2009 at 6:10 PM, Rolf Schaufelberger r...@plusw.de wrote: How can I call some initialisation code in role applied to an already existing object ? Normally I use   after 'BUILD' for this. When I call  MyApp::Role::Job::Manager-meta-apply($lisa); the object  lisa  exists

Re: Roles, Classes and silent overriding

2009-04-15 Thread Chris Prather
On Tue, Apr 14, 2009 at 2:41 PM, Stevan Little stevan.lit...@iinteractive.com wrote: On Apr 14, 2009, at 2:29 PM, Hans Dieter Pearcey wrote: On Tue, Apr 14, 2009 at 02:22:52PM -0400, Stevan Little wrote: So, while I am not willing to change this behavior, I am willing to add a warning so

Re: Moose::Util function for applying missing roles

2009-04-15 Thread David E. Wheeler
On Apr 14, 2009, at 10:19 AM, Chris Prather wrote: On Tue, Apr 14, 2009 at 1:14 PM, Stevan Little stevan.lit...@iinteractive.com wrote: Or perhaps ensure_all_roles_are_applied? I'm still voting for also_also_wik() +1 D

Re: Roles, Classes and silent overriding

2009-04-15 Thread Stevan Little
No, that is correct, but the actual process is that the method from the role is composed into the class, then the around wraps it. So no need to turn off the warning as it would not actually happen. - Stevan On Apr 14, 2009, at 2:47 PM, Hans Dieter Pearcey wrote: On Tue, Apr 14, 2009 at

Re: Roles, Classes and silent overriding

2009-04-15 Thread Hans Dieter Pearcey
On Wed, Apr 15, 2009 at 12:24:36PM -0400, Stevan Little wrote: No, that is correct, but the actual process is that the method from the role is composed into the class, then the around wraps it. So no need to turn off the warning as it would not actually happen. Er, yeah, that was my point: