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

Re: XML or Storable?

by moodster (Hermit)
on Apr 03, 2002 at 15:22 UTC ( [id://156327]=note: print w/replies, xml ) Need Help??


in reply to XML or Storable?

For read-only access (such as config files or static data), I tend to use XML::Simple, which is a gem of a module. It happily parses large XML files and spits out an anonymous hash or array with your data formatted the way you expect. Excellent. And to make things even better, it has locking support and will cache the parsed XML tree as a separate file using (you guessed it) Storable! You get the best of two worlds: human-readable files that are lighting fast to load.

However, for complex read/write-operations I wouldn't recommend reading and writing entire XML files. Maybe you should go with a mixed solution and put your Storable objects in a DB_File?

Cheers,
--Moodster

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-26 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found