Victor,

My experience has always been that Moose is as flexible as possible without
causing fundamental logical conflicts (And their companion hard to debug
issues).  It is important to note that a Moose Role is not a one for one
match to other programming languages implementations for a role.


https://metacpan.org/pod/distribution/Moose/lib/Moose/Manual/Roles.pod#Roles-Versus-Abstract-Base-Classes

The question you are asking also falls in the line of a bigger question
that is partially outside of the scope of Moose implementation.


http://www.javaworld.com/article/2076814/core-java/inheritance-versus-composition--which-one-should-you-choose-.html

   https://en.wikipedia.org/wiki/Composition_over_inheritance

Are you aware of the following two pieces of Moose documentation?  The may
help to resolve some specifics around any specific implementations.


https://metacpan.org/pod/distribution/Moose/lib/Moose/Manual/Roles.pod#METHOD-CONFLICTS


https://metacpan.org/pod/distribution/Moose/lib/Moose/Manual/Roles.pod#METHOD-EXCLUSION-AND-ALIASING

Best Regards,

Jed

On Wed, Aug 10, 2016 at 6:00 AM, Victor Porton <por...@narod.ru> wrote:

> Moose roles have some limitations, such as inability to override a
> method in a class which "with"es the role.
>
> But I can use an abstract base class instead of a role.
>
> Are there any real situations where roles are better than base classes?
> With examples, please.
>

Reply via email to