[Nh-pm] Hash Persistence?

Ben Boulanger ben at blackavar.com
Thu Apr 17 14:07:47 CDT 2003


> I have a module which creates a rather large hash table.  The values 
> of this hash are also hashes.  I'm looking for a way to create 
> a persistent store for this Hash of hashes, any ideas?
> 
> One thought I had was Mark Jason Dominus' Memoize.pm, but that 
> doesn't seem to be quite right for this particular problem.
> 
> The other thought I had was storing each leaf hash as a separate db 
> file on disk, but that seems it would require almost as much disk 
> access as computing the entire hash to begin with, if not more.
> 
> The structure of my hash table is this:
> 
> 	OneKey => \%atable ( subkey1 => value,
> 			     subkey2 => value,
> 			     etc.
> 		           ),
> 	TwoKey => \%btable ( subkey1 => value,
> 			     subkey2 => value,
> 			     etc.
> 		           ),
> 	etc.
> 
> Any ideas? (meanwhile, I'll be perusing CompSci and Perl Programming, 
> and The Perl Cookbook :)

I personally use the mldbm module found on cpan:
	http://www.cpan.org/modules/by-module/MLDBM/

Worked great for me.... then I said 'why am I not using mysql again?' and 
did that instead.... :)


--

Even a hare will bite when it is cornered.




More information about the Nh-pm mailing list