Like many people I've used the Perl module Data::Dumper for years and been reasonably happy with the output. Generally I want the output rolled up into the smallest (line-wise) output and Data::Dumper allows this. However, I use Math::FixedPrecision quite a bit in this project and as it is a blessed object the fixed precision numbers of 2 come out ridiculously verbose and almost unreadable.
Recently I saw a blog or reference to Data::Dump. I decided to try it and find the output better although a) the output is over multiple lines when I'd prefer the smallest amount of lines (achievable with Data::Dumper's Indent setting) and b) it suffered with the same issue with Math::FixedPrecision. However, Data::Dump also has Data::Dump::Filtered and this allows me to add a sub which filters the output and hence I can turn the rather verbose object output for Math::FixedPrecision with precision 2 into a simple string "11.01" with a simple filter like:
I've added filters for other objects too in some of my code to avoid printing the entire object like this:
Now, if only I could get it to condense the output more to reduce the number of lines.