I recently hacked together a very basic Smalltalk-esque class browser for Class::MOP. This is really just a basic proof of concept, and it was pretty simple to build, in fact, it is pretty much all TT code. (My CSS and HTML skills are sorely lacking, so my apologies if it looks really bad).
Of course being a proof of concept, it has many caveats. To start with, it needs the bleeding edge (svn) version of Class::MOP. It does not yet work well with Moose either (this is because the latest Moose is not yet synced up with the bleeding edge Class::MOP).
But it is not all bad news :) it does some really cool stuff as well. To start with, it is not just restircted to Class::MOP and Moose classes. Because Class::MOP is meant to also be able to introspect vanilla Perl OO, it can be used to browse those classes as well. And if you are using Moose or Class::MOP, the browser simply loads all the metaclasses in Class::MOP's metaclass cache, so as long as you load your classes, they will appear in the browser.
The eventual goal is to make this into a more full featured class browser, with full support for both Moose and non-Moose classes & possibly also including documentation (parsed from the POD). But anyway, enough babbling, back to $work for now.
- Stevan
Re:Impressive
Stevan on 2006-09-15T16:40:28
SteffenHere is the code, it simply uses Class::MOP's introspection rather than walking the stashes, and yes, the method bodies are feed to B::Deparse.
- Stevan