Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: DBI vs MLDBM/GDBM_File

by takshaka (Friar)
on Jul 04, 2000 at 09:08 UTC ( [id://20984]=note: print w/replies, xml ) Need Help??


in reply to DBI vs MLDBM/GDBM_File, etc.

I've used MLDBM with Storable over DB_File a few times. It is perfectly fine as long as you don't need to do searches through the value part of the data--for that you really want a relational solution. But as long as you're just doing key lookups, it's wonderful.

MLDBM is not necessarily a drop-in replacement, however. The biggest "gotcha" is that you cannot assign a value directly to a non-top-level element. That is, you can't do this to a MLDBM tied hash: $hash{foo}{bar}{baz} = 'stuff';

You must instead do this:

$tmp = $hash{foo}; $tmp->{bar}{baz} = 'stuff'; $hash{foo} = $tmp;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://20984]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (9)
As of 2024-04-19 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found