use Storable qw(freeze thaw); use Tie::HashWrapper;
tie my %wrappee, 'AnyDBM_File', ...; tie my %hash, 'Tie::HashWrapper', \%wrappee, -inflate_value => sub { thaw(shift) }, -deflate_value => sub { freeze(shift) }; $hash{a}{complicated}[4]{data} = [ 'structure' ];
I quit using DBM files after one corrupted on me during an aborted write. I suppose I could have simply copied the dbm before and after all my operations, but
with the advent of transaction-safe DBD::SQLite and the ever-presence of DBIx::Tree, I feel much more comfortable just tossing my
complicated data in a RDBMS and pulling it out.