in reply to Re^2: removing perldata , hashref from XML file (updated)
in thread removing perldata , hashref from XML file
Can't handle Math::BigInt=HASH(0x22bcc10) (yet) at DECODEi.pl line 90407.
This error message is surprising in that Math::BigInt overloads stringification, and the error message should not be showing the object name like that. You'd have to show a SSCCE that reproduces this issue to investigate further.*
Given this, I don't know if the following will work in your case, but my code can be extended to support objects that overload stringification by adding the following to the top of the file, just under the other use statements:
use Scalar::Util qw/blessed/; use overload ();
And this just before the line "elsif ( ref $data ) { die "Can't handle $data (yet)" }":
elsif ( blessed($data) && overload::Overloaded($data) && overload::Method($data,'""') ) { newel($parent, @args)->appendText("$data") }
* Update: It can be explained if you're reading a dump of a Perl data structure into a script that doesn't load the corresponding module. In this case, my code above won't work either unless you load the module.
|
---|