Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
So Child inherits from Parent. Parent used some roles but, unbeknownst to me, Parent implemented some methods the roles provided, effectively hiding them. Naturally, since this is silent, I had no idea this was happening. Yesterday, in preparing to eliminate this base class, I moved those roles to the classes which actually use them. Role composition failed and I blew another large chunk of time trying to figure out what happened. It was a perfect storm of several bits of code working together in exactly the way they needed to in order to sidestep a bug. Blind luck that it had worked previously.
Fortunately, it turns out that the hidden methods were effectively no-ops and this lack of activity was hidden by our class hierarchy and simply deleting them was enough to get the code working. Otherwise, I was facing a long battle trying to figure out the right thing to do. This little time bomb has been silently hiding under the covers for a few months now.
The moral of this story: if you must use inheritance, push your roles into your concrete classes, if possible, to gain the benefits of composition conflict checks.
Oops, It Did It Again (Moose) 0 Comments More | Login | Reply /