in reply to In need of a Dumper that has no pretentions to being anything else.
Dumpvalue mimics the debugger's dump format and is in core. Maybe that is closer to your needs?
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: In need of a Dumper that has no pretentions to being anything else.
by BrowserUk (Patriarch) on Feb 23, 2005 at 10:49 UTC | |
Thankyou Aristotle. In it's veryCompact form the output is exactly what I was looking for:
And it even has an option to see through overloading and handle what comes out -- at least part way.
All it needs is to not de-overload the final SCALAR values so that Math::Pari will return the numbers, which as it's in Perl, I can fix. It also does circularity testing:
But dumping my testcase above, it uses less than 50% extra memory--a considerable saving over the 250% of Data::Dumper. Though I now realise that a large proportion of the extra memory is DD consumes is used by building the output in memory rather than dumping straight the select'd output handle. I think I can see how to reduce that further still--though it may slow it down a little. And it's been sat there on my machine the whole time! It's a bit embarrassing that I've never noticed it, but I don't ever recall it being mentioned. Not only did someone else see the need for what I was asking for, they wrote it, covered all the bases and dropped it on my machine without telling me:) Once again, thanks Aristotle. Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
| [reply] [d/l] [select] |
by Aristotle (Chancellor) on Feb 23, 2005 at 10:59 UTC | |
My pleasure. :-) I only recently found it myself; I was idly flipping through the list of Template Toolkit plugin distributions on CPAN and stumbled over Template::Plugin::Dumpvalue, which made me aware of the module I'd had sitting right here, all the time. I don't know why I'd never heard of it before from anyone else either. It's pretty damn useful as a debugging aid. Makeshifts last the longest. | [reply] |