in reply to Re^2: Delegating to a role in Moose
in thread Delegating to a role in Moose
i.e. required methods. This is how a role indicates that a class consuming it should have some extra behaviour that the role depends on. Taking this to an extreme you can even have a role that only has required method specifiers - this gives you something similar to the interface construct found in Java/C#/PHP.package Foo::Bar; use Moose::Role; requires 'foo'; requires 'bar';
And this latter type of role is what is intended to be used when you specify a role to the 'handles' clause.
Does that make sense?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Delegating to a role in Moose
by nysus (Parson) on Jan 12, 2018 at 21:57 UTC | |
by Arunbear (Prior) on Jan 13, 2018 at 18:14 UTC | |
by nysus (Parson) on Jan 13, 2018 at 21:57 UTC | |
by Arunbear (Prior) on Jan 15, 2018 at 13:06 UTC | |
by Anonymous Monk on Jan 15, 2018 at 14:38 UTC |