Re: DBD::DBM and hashrefs
- From: jeff@xxxxxxxxxxxxxx
- Date: Fri, 14 Oct 2005 18:41:19 +0000
> -----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
.
- Prev by Date: Re: DBD::Oracle and ErrCount
- Next by Date: Re: DBD-AnyData, Handle cleared whilst still active...
- Previous by thread: Re: DBD::DBM and hashrefs
- Next by thread: Re: DBD::DBM and hashrefs
- Index(es):