szap has asked for the wisdom of the Perl Monks concerning the following question:

I usually use Data::Dumper to browse and debug my scripts with complex data structures. This is getting painful when it grows to > 5000 lines of Data::Dumper output. What would be nice is some module that can display that data structure in a GUI collapsable tree, ala a directory tree browser.

DDD has a great data displaying and browsing, but its perl support is slow and buggy.

A check on CPAN doesn't seem turn up anything. I would write one if I can't find one soon enough but the code would not be maintainable.

Preferable usage would be replacing

use Data::Dumper;
print Dumper $complex;
to
use Data::TkBrowser;
Data::TkBrowser::browse $complex;
  • Comment on Where can I get something to browse complex data structures via a GUI?

Replies are listed 'Best First'.
Re: (Zigster) Where can I get something to browse complex data structures via a GUI?
by zigster (Hermit) on Apr 24, 2001 at 11:54 UTC
    Hows about using XML::Dumper Then use one of the many XML browsers out there? I have not used XML::Dumper myself and note there are no tutorials or reviews of this module, if you use it how about writting one for us?
    --

    Zigster
Re: Where can I get something to browse complex data structures via a GUI?
by busunsl (Vicar) on Apr 24, 2001 at 10:48 UTC
    You can use the Tk interface to the Perl debugger:
    perl -d:ptkdb yourprog.pl
    It has an expression-browser.

    update: ptkdb can be foung in the Devel-Package on CPAN.

Re: Where can I get something to browse complex data structures via a GUI?
by rchiav (Deacon) on Apr 24, 2001 at 16:49 UTC
    If you're on a Wintel machine, you can use Activestate's Komodo. They are also working on a version for Linux, but I'm not sure what state it's in at the moment. Note - It's not for the resource challenged machines.

    Rich

Re: Where can I get something to browse complex data structures via a GUI?
by jeroenes (Priest) on Apr 24, 2001 at 10:50 UTC
    The alternatives I use:
    1. pipe the output through a shell-grep and/or less
    2. Use the debugger, and than access only a certain leave of the structure with 'x'.

    Jeroen
    "We are not alone"(FZ)