I'm looking into this possibility now. I've used roles with Moose and so I'm familiar with them. In my particular case, the plugins I want to use contain identical method names. So will that make the use of Roles impossible?
$PM = "Perl Monk's";
$MCF = "Most Clueless FriarAbbotBishopPontiffDeaconCuratePriest Vicar";
$nysus = $PM . ' ' . $MCF; Click here if you love Perl Monks
Well, so far, so good. This approach looks very promising. I've converted one module over so far and it works. Thanks a lot.
One thing I wanted to accomplish with this module is to get a much better feel for OO Perl. I'm not sure what goes on under the hood with roles. My old Damian Conway book from like 2000 makes no mention of them. You know any good resources for learning about how they accomplish their jobs? I noticed the classes get tacked with a __WITH__ and then the name of the role.
$PM = "Perl Monk's";
$MCF = "Most Clueless FriarAbbotBishopPontiffDeaconCuratePriest Vicar";
$nysus = $PM . ' ' . $MCF; Click here if you love Perl Monks
... most likely, Roles are just the wrong tool. Roles are just inheritance in disguise and only make sense when you have mostly identical behaviour that you want to customize in small parts.
What you have is a set of behaviours that you want to arrange in a sequence, potentially leaving out some parts. This is not easily modeled by inheriting things and much easier modelled by an array that contains the steps.