Data::NeatDump
use Data::NeatDump;
print dump($long_struct);
print Dump($data1, $data2, $data3);
[ "First element", { key1 => "Short string", key2 => "Another string", }, [ 2.71828182845905, 3.14159265358979, ], ]
Why not Data::Dumper?
Several reasons:
- shorter usage
- cleaner API
- nicer and more structured output by default
- hash keys are sorted
- cuts long structures using ellipsis
- but: for neat presentation, not general serialization