At least for Perl Moose, there are no interfaces, so the roles are clearly divided into them, and in general mixins too. I would say that there may still be a case for abstract base classes. Roles can be considered do objects, where classes are the ones in which they .
For this line of reasoning, use for an abstract base class may still be acceptable. One example is a URL. For a URL, it can be an abstract base class. The I / O stream may differ, perhaps better as a role, because it determines how things behave, rather than what they are.
However, when using roles, I still do not see a clear need for true multiple inheritance from more than one class.
source share