webmistress_ming has asked for the wisdom of the Perl Monks concerning the following question:
Howdy, Perl Monks!
I'm trying to implement roles in our extensive codebase using Role::Tiny, but it's not behaving as expected. CPAN clearly states: "If a method is already defined on a class, that method will not be composed in from the role.". However in my current code it is clear that the method in the role is being used.
My code works as follows (package naming simplified for clarity):
I can only assume that something arcane is happening with the combination of standard inheritance and roles, but I can't put my finger on it...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Role::Tiny not behaving as expected
by tangent (Parson) on Feb 29, 2016 at 20:47 UTC | |
by webmistress_ming (Initiate) on Mar 01, 2016 at 11:23 UTC | |
|
Re: Role::Tiny not behaving as expected
by Haarg (Priest) on Mar 01, 2016 at 08:19 UTC | |
by webmistress_ming (Initiate) on Mar 01, 2016 at 11:25 UTC | |
|
Re: Role::Tiny not behaving as expected
by choroba (Cardinal) on Mar 03, 2016 at 19:21 UTC |