librole-tiny-perl

Perl module for minimalist role composition
  https://metacpan.org/release/Role-Tiny
  0
  no reviews



Role::tiny is a perl module to do minimalist role composition. role composition can be thought of as much more clever and meaningful multiple inheritance.

the basics of this implementation of roles is:
* if a method is already defined on a class, that method will not be composed
in from the role.
* if a method that the role "requires" to be implemented is not implemented,
role application will fail loudly.
unlike class::c3, where the last class inherited from "wins," role composition is the other way around, where first wins. in a more complete system (see moose) roles are checked to see if they clash. the goal of this is to be much simpler, hence disallowing composition of multiple roles at once.