Stories
Slash Boxes
Comments
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

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Wednesday May 20, 2009
04:24 PM

The Moose Class Hierarchy

[ #39010 ]

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.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • 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.

    • 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.