Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: XML::Simple needs to go!

by mr_mischief (Monsignor)
on Jan 06, 2016 at 15:33 UTC ( #1152087=note: print w/replies, xml ) Need Help??

in reply to XML::Simple needs to go!

XML::Simple would probably be better named 'XML::Basic' or 'XML::Tiny'. Perhaps even 'Acme::TinyXML' would be a better name. With the right options it does read quite a bit of valid XML into reasonable data structures and will write valid XML from data structures. It's a serializer/deserializer for XML, not really a full-blown XML tool.

I've never used for configuration files for my own work, but I can see where it could be handy if people really like XML. I have used it in a configuration front-end to things that require their configuration files in XML and expect someone to hand-tweak that. In fact, I once had an ActionScript web app I had to deploy for a client that depended on a specific ordering of XML nodes. It was simple enough to change the ActionScript not to care about ordering, so I did that. Then I used XML::Simple in a pretty straightforward way to generate from an interactive program what my client would never have been expected to maintain by hand.

As for YAML, the more quirks I see with that the less I despise XML for configuration. I tend to use JSON, and if the target audience is nontechnical enough not to grok JSON then they probably want a configuration front-end rather than tweaking the configuration file by hand anyway. In my current work, the JSON configuration file is often generated from other data by a configuration management system.

If someone's trying to handle arbitrary XML with XML::Simple, then that's going to be painful for them. There are warnings specifically about that in the module's documentation.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1152087]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2022-12-09 23:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found