in reply to Re^3: OO design: abstract class or can()?
in thread OO design: abstract class or can()?
It's also a nice bit of future-proofing in case Perl ever gets multi-dispatch... and that day may be closer than many people think. (I mean dispatch based on role, not structural type.)
Meh. Still think it would be simpler without the "if". Spinning out the calling behaviour from the thing being called feels odd to me.
If the calling is independent of the class then something AOPish would seem appropriate. If not then having e the base class have that trait with a null method rather than have a condition on something that may not be present seems cleaner to me.