Data Dumping
John M. Dlugosz
created: 2006-05-03 16:11:01
I see that ActiveState's build includes three different modules for dumping data: Data::Dumper, Data::Dump, and Dumpvalue.

I've always seen Data::Dumper refered to here and in other articles. So what are the relative merits of the others, that are common enough to install by default?

—John

Re: Data Dumping
created: 2006-05-03 16:21:23
Data::Dump says this: "The Data::Dump module provides a much simpler interface than Data::Dumper."

Dumpvalue is included with Perl by default, but I've never used it. Data::Dumper seems to be the default, at least around here. I've not found a need for anything else.
Re: Data Dumping
created: 2006-05-03 17:30:08
There's also Data::Dumper::Simple, which is pretty nifty. It tends to add a lot of wall-clock seconds to your program's execution though, so I recommend using it for debugging then removing it for production.

---
It's all fine and dandy until someone has to look at the code.
Re: Data Dumping
created: 2006-05-04 07:28:10

You may wish to have a look at Answer: How can I visualize my complex data structure?, where I provide a comparison of some data dumping modules.

HTH,

planetscape

perlmonks.org content © perlmonks.org and John M. Dlugosz, kwaping, planetscape, socketdave

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03