Data::Dumper::GUI
Everyone knows all that command-line stuff is for weirdo geeks, right? ;-) So let's bring Data::Dumper kicking and screaming into the 21st century and give it a pretty GUI!
Introducing Data::Dumper::GUI; a GUI for Data::Dumper. It allows you to view your data structures as a tree with collapsible nodes. Data::Dumper::GUI is built using Prima (a rather nice GUI toolkit designed specifically for Perl, that supports Win32 and X11, with no dependencies and compiles pretty quickly... for a GUI toolkit) and Moo.
It has special support for Moose objects, using the metaobject protocol to introspect objects being dumped and provide additional information (superclasses, subclasses, roles, attributes, methods). It will do the same for Moo objects too (but only if Moose is loaded).
And it comes bundled with a plugin for Reply.
It's early days; the GUI ain't pretty enough yet. Take a peek though, and let me know if you have any ideas for improvements.
I lack the words.
This is so fucking cool.
Feature request: It would be really nifty if it included a REPL.
So fucking awesome
That's nice. But to be honest I'm more interested in Prima right now. I'd long ago given up the search for a good GUI toolkit for Perl.
There is a REPL built for Prima already: https://github.com/run4flat/App-Prima-REPL
It might not be too difficult to get them talking to each other.
Hey cool, another Prima app!!
David Mertens has done a lot of work using it for App::Prima::REPL (a GUI REPL for PDL) and other things. He is also a big proponent of its Object model for C level objects.
Great work! Keep it up!
@Joel: Any other Prima apps I can see the showcase of?
I just tried installing Data::Dumper::GUI. It doesn't showcase many of the Prima widgets available. And the fixed width font looks very very wide.
Toby rocks!
A few things:
There may be more from me later :)
In short, there are lots of ideas to improve this, to go beyond Data::Dumper. Nice work!
There's a plugin for Reply, which is Jesse Luehrs' new REPL. It allows you to launch ddGUI from within Reply. It would be nice to have it the other way around though; to have a Reply panel at the bottom of the ddGUI window.
Thanks Stevan. Many of these are already on my mental todo list.
Some of the problems of the right-hand panel stem from the fact that it's a PodView widget. The TextView widget appears to offer far better formatting options, but there's scant documentation on how to use it.
Yes, nodes can be expanded and collapsed. As far as I can tell, highlighting the node and hitting "Enter" is the only way to do it. (If there's a way to do it with a pointing device, I've not discovered it yet.) Initially arrayref and hashref nodes are expanded, except blessed references which are collapsed (but may be expanded to peek at the object's guts).
Array indices start from 1 because I increment
$i
too early. :-)Hm, that doesn't do anything for me over here.
Weird. I tried this by dumping \%INC and this will make it segfault every time. Dumping \@INC works just fine.
Hi Toby, I think this is a very cool app! If you need help with base Prima api, TextView or whatever else please don't hesitate to ask, I'll be glad to help.
As for the fixed font problem, I'll see what I can do.
Yeah, that last bit is what i was talking about. :)
Toby, Steven: there is expanding with mouse, it seems that both of you have Prima compiled without GIF support somehow and that's why it's disable. If Prima has it, outline widget shows small extra [+] and [-] icons next to each item.
One thing we found really useful at blekko was a remote inspection tool -- we have a lot of long lived daemons, and they talk to each other with messages. We added messages that let you inspect specially-registered variables from the command line, list hash keys and counts, descend into complicated objects, etc.
If you had a long-lived perl process on a server that implements a webserver, for example, you could see how this feature might be useful!
does it run under mac (because Prima doenst configure right now)?
Thanks
Thank you very much. This makes finding the part I am looking for in a complex structure I've been passed so much easier.
This is so awesome! Thanks! :D