Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

merlyn (47)

merlyn
  merlyn@stonehenge.com
http://www.stonehenge.com/merlyn/
AOL IM: realmerlyn (Add Buddy, Send Message)
Yahoo! ID: realmerlyn (Add User, Send Message)

PAUSE-ID: MERLYN [cpan.org].
See my home page [stonehenge.com].

Journal of merlyn (47)

Wednesday May 19, 2004
10:29 AM

DBM::Deep rocks

[ #18831 ]
I just finished writing an article for SysAdmin about lightweight persistent data solutions, and stumbled across DBM::Deep. Today, I'm combining that with Template, as in:

use Template; use DBM::Deep;
my $t = Template->new; # create engine
my $db = DBM::Deep->new("foo.db"); # create storage
$t->process($my_template, { db => $db });

We now have the db hash in the template which is effectively a permanent multi-level data structure. What's more, it can be safely shared between multiple processes (there are lock/unlock methods for critical regions).

This rocks. This module should be core. Down with MLDBM. Up with DBM::Deep!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I don't seem to be able to read it off your site. Do I have to wait for the mag?
    • Maybe you missed this:
      [Content embargoed until 00:00:00 01-Aug-2004 per publisher's agreement.]
      It means exactly that. After that date, you'll be able to read it on my site. Before that, yes, you'll have to get the original publication somewhere. Sorry, that's the rules.
      --
      • Randal L. Schwartz
      • Stonehenge
  • This module does look great. Fantastic docs, plenty of tests and zero interface bloat! Thanks for the pointer.

    -sam

  • It seems mostly pointless to me. Performance won't be able to match that of C-based dbm systems + Storable. It may be a good option for people who have a VERY narrow and VERY deep data structure they want to store, but that isn't very common. It still has the same problems with TIE that MLDBM does, i.e. second-level data updates do not trigger the TIE methods.
    • I take back the part about second-level updates: it handles these by TIE-ing the inner data as well. I guess this means it only works for standard Perl structures though, and can't store objects.