Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: AppConfig or XML::Simple for All my modules?

by Masem (Monsignor)
on Feb 06, 2002 at 14:24 UTC ( #143621=note: print w/replies, xml ) Need Help??

in reply to AppConfig or XML::Simple for All my modules?

Not an opinion, just an observation:

A recent Java magazine column by someone that I know is respected in the field (name slips me, unfortunately) had a recent article on using Windows .INI-like files as application initialization files, and proceeded to discuss the ways of reading and writing such files in Java. The next month, the same author had a followup column, starting off that he recently a lot of email lambasting him for not using XML; the followup column was how to use the same ideas in Java but using an XML-based system.

Now some opinions :-). I think a lot has to do with what you expect your config structure to look like and what you expect your audience to be able to use. Are you mostly just initializing a hash of items? Appconfig is probably the right choice. Maybe you expect that users should have an easy time of changing the config file, again making appconfig better. Right now, Appconfig config files are probably not hard to understand, while XML may be; however, in the near future, I'm sure we'll see tree-based editors that make the handling of XML editing very easy and thus making an XML file a better choice.

But more importantly: Why not include both? XML::Simple is sufficiently smart enough that if it immediately recongize the file as XML, it will die out, and this allows you to drop through to Appconfig. XML::Simple is sufficiently lightweight to not pose a big problem in terms of CPU and memory use on your apps. The only major concern is that you might have to massage the returned hashes from either XML::Simple or Appconfig to make sure that you are working with the same hash structure from each.

Dr. Michael K. Neylon - || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important

  • Comment on Re: AppConfig or XML::Simple for All my modules?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://143621]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2018-05-21 23:16 GMT
Find Nodes?
    Voting Booth?