in reply to Flat File Fun (or You Just Saved My Class)
i have found this to be a practical (both space efficient and reliable) way to serialize many structs. i have used the admirable xml::twig to operate on the xml generated by xml dumper. obwarning: there may be issues with the xml generated in terms of well-formedness. i think diotalevi did not like this solution, and i am sure he had good reason, though, ermm, i'm not quite sure what it was: my forgetfulness.use XML::Dumper; # deserialize my $coffin = "resurrectme.xml.gz" my $xdumper = new XML::Dumper; my $lazarus = $xdumper->xml2pl($xml_gz); # ... $lazarus modifications sit somewhere here # serialize $xdumper->pl2xml($lazarus, $coffin);
|
|---|