From
XML::Simple:
The use of this module in new code is discouraged. Other modules are available which provide more straightforward and consistent interfaces. In particular, XML::LibXML is highly recommended.
The major problems with this module are the large number of options and the arbitrary ways in which these options interact - often with unexpected results.
Patches with bug fixes and documentation fixes are welcome, but new features are unlikely to be added.
Essentially, the author has declared it broken by design. My understanding that the general advice these days is to use
XML::Twig or
XML::LibXML. And am not sure how vulnerable they are to untrusted sources.
I'm aware that this is a bit off point, and you specifically didn't want to recraft the code to use a new API, but....
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.