I've spent much of the day unsuccessfully tracking down a bug. We have an abstract base class (A) for building and transporting files for customers. One of our customers has an abstract class (B) which inherits from 'A'. In the process of creating two classes (D and E) that inherit from 'B', I realized that they had common functionality that I couldn't put in 'B', so I created 'C' for them to inherit from. I didn't use delegation because I had to guarantee (apart from the tests) that certain methods in 'B' were overridden. It looks like this:
A ^ | B ^ | C ^ / \ D E
I hate overusing inheritence and in this case, it's for good cause (in fact, now I pretty much only use it with abstract classes.) Somewhere along the way things horribly broke down. 'A' tried to call C::transport method and the program died when it couldn't find it, despite the fact that 'A' implements it. After a lot of fruitless debugging, out of desperation I wrote:
sub C::transport { shift->SUPER::transport }
That shouldn't be necessary, except that it fixed the problem. Then I checked the logs and everything looked normal and &A::transport was properly writing out its behavior to the log files, stating that it had in fact transported the file in question. Except the file was never sent. It's going to be a long day.