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
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
Gleee! (Score:1)
Impressive (Score:1)
I have no idea how you wrote it. If I had written it, I'd have walked the stashes and went from there. But then, how do you manage to extract the code for specific methods? B::Deparse? Or do you parse the sources themselves?
Steffen
Re: (Score:1)
Here [0beta.co.uk] 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.
- StevanYou'know... (Score:1)
I really can't help but wonder what sort of magical things you could do with a combination of something like the Display.Only and Jemplate JSAN modules.
Send all the data down the pipe at once, and then just render the inline bits client-side