I was playing around with Class::Sniff, trying to resolve an install issue that AdamK++ pointed out to me. I fixed it and used the csniff utility to diagram the Moose object hierarchy.
moose $ csniff -n '^Moose' --png lib/ > moose.png
That's not too complicated, but it does show a problem I have. I need to figure out grouping algorithms, and maybe color, to make the graphs more useful. Suggestions welcome. I'm thinking about grouping by the segments in the class name, but I'm unsure if that's the best way to go. It's easy, but doesn't always reflect the inheritance hierarchy.
Why include UNIVERSAL in the diagram?
Its presence doesn't clarify anything. The only thing it does is make the graph more difficult to read.
Re:Why UNIVERSAL?
Ovid on 2009-05-21T14:58:03
UNIVERSAL is included because I didn't deliberately exclude it. Not sure it makes the graph harder to read, though, as it ties things together nicely. Your mileage may vary
:)
The most significant, yet theoretically easy thing that I can think of would be identifying classes vs roles.
Yeah, I could go for the full thing and have arrows indicating role consumption, etc., but a simple identification of which things were concrete and which were not would be a help.