Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^5: In need of a Dumper that has no pretentions to being anything else.by demerphq (Chancellor) |
on Feb 23, 2005 at 20:10 UTC ( [id://433847]=note: print w/replies, xml ) | Need Help?? |
Depends on what you mean by "right". Something that is reasonably close to valid perl that will recreate the original data. In this case the code is just plain wrong, with or without Purity mode. this information should be preserved otherwise certain structures would have identical output even though they're not identical. You mean like Data::Dumper does below? (And Data::Dump::Streamer does not?)
probably possible to write something that would reconstruct the correct sturucture but it would involve some sort of constraint solver See Data::Dump::Streamer for a dumper that handles these things properly. DD does a single pass over its dataset, and a depth first one at that, this almost guarantees that it will get things like this wrong. These are very old bugs, first raised by merlyn years ago (see a bug report that involves the dog pound) that still havent been fixed, and frankly probably will never be fixed.
--- demerphq
In Section
Seekers of Perl Wisdom
|
|