in reply to Re^2: OO: how to make a generic sub (use roles or inheritance)
in thread OO: how to make a generic sub
"I think its is worth noting that Roles can be simply implemented using basic Perl5 mechanisms"
Ultimately all of Moose can be implemented using basic Perl5 mechanisms. (Because all of Moose is implemented using basic Perl5 mechanisms!)
Yes, this aspect of roles is basically just importing. But Role::Tiny also gives you method conflict checking out of the box (i.e. if you compose two roles with the same method name into the same class, you don't get a random choice, you get an error). And it provides nice integration with Class::Method::Modifiers if you happen to have it installed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: OO: how to make a generic sub (use roles or inheritance)
by BrowserUk (Patriarch) on Jun 27, 2013 at 20:45 UTC |