Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2018-08-15 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (159 votes). Check out past polls.

    Notices?