Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's Perl's Data::Dumper ! Some of the options present in the perl version could be useful in the JavaScript too, e.g. pretty-printing structures for debugging output.


Data::Dumper has proven invaluable during those "what the fsck is this routine doing" moments.


Yes, it's a fantastic aid, I don't know what I'd do without it when trying to debug code dealing with nasty mixes of arrays and hashes.

What would be fantastic for perl is actually something that javascript already has. In most browsers, if you print a data structure to the console, it is presented as a clickable tree structure, where you can show or hide the bits of the data that you want to check.

I'd love some way to recreate this in perl (and in a terminal if possible). The downside of Data::Dumper is that you can produce hundreds of pages of output, when you really want to just examine a tiny part of it.


https://metacpan.org/pod/Data::Dumper::GUI

AFAIK, no one has written a terminal version yet. There's a TUI framework called Tickit which would make writing one quite easy, I think.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: