Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How can I visualize my complex data structure?

by Xiong (Hermit)
on Feb 17, 2010 at 14:14 UTC ( [id://823716]=note: print w/replies, xml ) Need Help??


in reply to How can I visualize my complex data structure?

My personal favorite is Smart::Comments.

use strict; use warnings; # Enable special comments for debugging and reporting: use Smart::Comments; my $data_structure = { a => [ 1, 2, 3 ], b => [ { X => 1, Y => 2 }, { X => [ 1, 2, 3 ], Y => [ 4, 5, 6 ], Z => [ 7, 8, 9 ] }, ], }; # the following is a "smart comment" which causes a dump of the expres +sion, using Data::Dumper: ### $data_structure
Produces this output:
### $data_structure: { ### a => [ ### 1, ### 2, ### 3 ### ], ### b => [ ### { ### X => 1, ### Y => 2 ### }, ### { ### X => [ ### 1, ### 2, ### 3 ### ], ### Y => [ ### 4, ### 5, ### 6 ### ], ### Z => [ ### 7, ### 8, ### 9 ### ] ### } ### ] ### }

Smart::Comments does much, much more than this, too.

Replies are listed 'Best First'.
Re: Answer: How can I visualize my complex data structure?
by BioLion (Curate) on Feb 18, 2010 at 09:31 UTC

    I think i have a new favourite too...

    Just a something something...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://823716]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-19 10:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found