in reply to Re: Efficient hash storage?
in thread Efficient hash storage?

Thanks for your fast response.

So, I was concerned about Data::Dumper for the reason you outline above.. (and I've never used 'eval' for roughly the same reason that I don't own a TV or a Playstation).

Are you suggesting YAML is the faster solution (faster than split)?

I recognize that there are different tools for different jobs but is there any consensus on a simple, portable method for effecient storage ("freeze/thaw") of session hashes that remain mostly read-only?

Thanks again,

Replies are listed 'Best First'.
Re^3: Efficient hash storage?
by jhourcle (Prior) on Jul 08, 2005 at 11:25 UTC

    Define 'mostly' read-only.

    From the sounds of things for what you're doing, you're basically making a configuration file of some sort, so you might want to look through CPAN for 'config'

    I'm currently using a mix of different styles -- XML, unix-esque (key=value), and tab deliminated tables, even within the same project.

    Every situation has slightly different needs, and each method serves a different set of needs. (eg, I'm using XML on stuff that has a heirarchical relationship, with a potential for null or multiple values for some attributes (of which the attributes may be added to later), and may be used in completely other programs, not necessarily written in perl; key=value pairs for items that are a flat list, and don't have multiple values; tab delim tables for records with a fixed number of non-null attributes)