You've probably read about Class::Sniff, software I've "written in anger" to deal with some terribly class composition issues. Because I already had a graph available, I decided to use it for visualization of class hierarchies. I know some people sneer at visualization ("hey, just let me read the code!"), but really, they're wrong. Reading code gives you fine-grained knowledge that a diagram cannot. Seeing the diagram instantly gives you knowledge about the code which it could ages slogging through the code to acquire.
jplindstrom started using Class::Sniff to refactor our code base. Here's a small part of it before using Class::Sniff. Here's the same bit after using Class::Sniff. It still has issues, but it is far, far better than it was. Heck, which would you want to work on?
Our test suite reveals that this refactoring has introduced one bug -- amusingly in the code with the tiny amount of multiple inheritance left. Seems we have an exception being thrown twice, but we're having trouble tracking it down.
This had nothing to do with multiple inheritance. At all.
The problem was it wasn't a pure refactoring. It added functionality to a class (which was appropriate), and the setup code for the failing test wasn't amended to reflect this.
Re:Not quite
Ovid on 2009-02-28T01:44:03
Are you saying that you don't have a problem with multiple inheritance, or that you're just not worried about it and eliminating it was just a side-effect of something else you were trying to do?
Re:Not quite
jplindstrom on 2009-02-28T15:55:20
I'm saying the bug had nothing to do with MI.
My reply was referring to the last paragraph about the bug, not the whole post. Reading the reply again, I can see that wasn't clear.