Closed eserte closed 8 years ago
Thanks for pointing this out.
Apparently MODS::Record changed its behaviour. In the past it parsed JSON with this:
JSON->new->utf8(0)->parse($source);
But that could not handle binary strings/filehandles, and you had to set the binmode of your filehandle yourself, as I did.
Starting from version 0.11, this behaviour was fixed:
JSON->new->utf8(1)->parse($source);
So it started decoding an already decoded string.
I update the code to support both versions of MODS::Record
Looks good so far (except on Windows, but this is probably a different issue): http://matrix.cpantesters.org/?dist=Catmandu-MODS+0.31
Test output looks like this:
Statistical analysis shows that the problem might be triggered by MODS::Record 0.11 (0.09 was OK). It could also be (less likeley) caused by Catmandu 0.9403 and later.