From: Jim C. <jc...@di...> - 2003-02-01 00:39:39
|
Kevin Goess wrote: > Thanks for the tip, Jim. I tried it, and then noticed that > Data::Dumper is also not consistent about putting quotes around hash > values. I'm only using it in the test, to see whether the data > structures returned by the parsers PropertiesConfigurator and > DOMConfigurator are the same for equivalent configs. > > In t/038XML-DOM1.t I ended up stealing some code from Data::Compare to > diff the data structures, all this just so we wouldn't have a > dependency on Data::Dump. I guess I wasnt reading very carefully wrt why you were using it, it reminded me of ============================================================ Log::Log4perl Recipe of the Week (#14): in which case it might be appropriate, since sorted structures are easier to eyeball for expected values, and for diffs vs other copies of the same logfiles. while were at it, $Data::Dumper::Indent = 1; is a 'better' format than the default: 2, which indents based on the string-length of the keys, and can thus look kinda ragged when a hash has $h = { 'shortkeys' => [ 1, 2 ], 'really-long-key-names-which-result-in-data-sensitive-indents' => [ 1, 2, ], }; but, since that was a user recipe, and not a function, this might reduce to Tip #14-a |