Re: DBD::DBM and hashrefs




> -----Original Message-----
> From: Ryan Tate [mailto:lists@xxxxxxxxxxxx]
> Subject: DBD::DBM and hashrefs
>
> Hello,
>
> I have a question about using DBD::DBM in MLDBM mode: does anyone know
> whether it works with hashrefs as values, or just arrayrefs?
>
> Reading the docs and trying the module leads me to believe it only
> works with data like:
>
> $Tied_hash{ $id } = [ $val1, $val2 ];
>
> But all the data in my DB file looks like:
>
> $Tied_hash{ $id } = { key1 => $val1, key2 => $val2 };

I believe you can specify hash storage by passing the appropriate DBM flags when you do DBI->connect(). Use the flags your DBM implementation expects and pass them as specified in the DBD::DBM docs.

--
Jeff


.