in reply to Persistence for options?

I wrote code for an INI-like file format, not liking what was available, but now there's DBD::RAM which supports INI format. The good thing is it lets your users edit the file, and it does lend itself to simple hashes. But if you actually would rather not make the file user-editable, tied hash or Storable seem fine.. XML seems like a bit much to me, and a little dangerous (users might think they can edit it without keeping strictly to the rules) but some people might think differently.

You could also just do an eval on the file in which case it could hold code itself too but most people don't do that (I think Larry Wall did once though).

Finally DBD::RAM can freeze/thaw data structures:

DBD:RAM can import data directly from references to arrays of arrayrefs and references to arrays of hashrefs. This allows you to easily import data from some other portion of a perl script into a database format and either save it to disk or simply manipulate it in memory.

Replies are listed 'Best First'.
Re: Re: Persistence for options?
by mirod (Canon) on Aug 15, 2001 at 16:10 UTC