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

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 02:

Re: Roles, Classes and silent overriding

2009-04-15 Thread Chris Prather
On Tue, Apr 14, 2009 at 2:41 PM, Stevan Little 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 that it is not so "

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

Re: Roles, Classes and silent overriding

2009-04-14 Thread Stevan Little
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 that it is not so "silent" anymore. So code like this will warn you that your overriding

Re: Roles, Classes and silent overriding

2009-04-14 Thread Hans Dieter Pearcey
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 that it is not so "silent" anymore. So code like this will > warn you that your overriding a class method. This is a reasonable compromise, and

Roles, Classes and silent overriding

2009-04-14 Thread Stevan Little
So, Ovid has a new Moose related post on his use.perl journal (http://use.perl.org/~Ovid/journal/38809 ) which sparked a discussion on #moose IRC channel. The core of Ovid's issue is that when a role is composed into a class, the class wins in any method conflicts. This is how roles were ori