NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Clue in the verb? (Score:1)
I've found that a reasonable rule of thumb can be, if you can say "X is a Y" and it sounds sensible in relation to the real world entities, then inheritance is probably right. On the other hand, if it "X does Y" sounds much more natural then it's time to use a role. Of course, you can twist words to stick it into either, but I think we can probably agree that "Dog does Walk" sounds much natural than "Dog is Walker" and that "Dog is Animal" is more natural than "Dog does Animal".
Reply to This