Restore data dumped by data::dumpxml
use Data::DumpXML::Parser;
my $p = Data::DumpXML::Parser->new; my $data = $p->parsefile(shift || "test.xml");
\*(C`Data::DumpXML::Parser\*(C' is an \*(C`XML::Parser\*(C' subclass that can recreate the data structure from an \s-1XML\s0 document produced by \*(C`Data::DumpXML\*(C'. The parserfile() method returns a reference to an array of the values dumped.
The constructor method new() takes a single additional argument to that of \*(C`XML::Parser\*(C':
A subroutine that is invoked to bless restored objects. The subroutine is invoked with two arguments: a reference to the object, and a string containing the class name. If not provided, the built-in \*(C`bless\*(C' function is used. For situations where the input file cannot necessarily be trusted and blessing arbitrary Classes might give malicious input the ability to exploit the \s-1DESTROY\s0 methods of modules used by the code, it is a good idea to provide a no-op blesser: my $p = Data::DumpXML::Parser->new(Blesser => sub {});
Data::DumpXML, XML::Parser
Copyright 2001 Gisle Aas.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.