Moose interfaces are problematic, for 2 reasons.
- They are compile time, but runtime features such as attribute delegation could provide the interface (role ordering is the real problem here)
- They don’t ensure anything other than the method name.
I think this problem can be solved better by using around
instead of requires
|
|
Ordering of course still matters here as you can have multiple around
modifiers on a method. This will throw an
exception if method is missing or if the types passed in are not correct.