The stupid question is the question not asked | |
PerlMonks |
Data::XDumperby xmath (Hermit) |
on Feb 16, 2003 at 15:14 UTC ( [id://235730]=perlmeditation: print w/replies, xml ) | Need Help?? |
A while ago I started on a data dumper that wasn't designed to be eval-able (like Data::Dumper) but human-readable and - more importantly - accurate.
I've just more-or-less finished the first version which fairly decently meets these goals, by doing a breadth-first walk and making use of B to analyze the data. An example of what Data::XDumper does: with default settings produces the output: $L001: Bar \ @L003: Quux @( {y => \@L003}, $L002: 'foo', substr($L002, 1, 2) ) $L001Here are direct links to the sources: Data::XDumper 1.03 and its prerequisite B::More 1.01. You can also browse them at CPAN. •Update: found a major memory leak, fixed Feb 20 13:11:50 CET 2003 in 1.03 And a syntax-highlighted version for online reading (also updated) I hope I can get some feedback on my approach and layout, and I need to know how robust it is. I've tried all kinds of input but the possibilities are endless, so perhaps other people can find things it breaks on. •Update: what I mean with the above paragraph is: Could you please run the most disgusting piece of data you can think of through XDumper and report the results? :-)
Back to
Meditations
|
|