[Templates] Template::Plugin::DBM::Deep released

[prev] [thread] [next] [Date index for 2004/05/20]

From: merlyn (Randal L. Schwartz)
Subject: [Templates] Template::Plugin::DBM::Deep released
Date: 14:59 on 20 May 2004
OK, so it's only version 0.01, but it has 11 tests that pass. :)

After you install DBM::Deep (single file, pure perl module),
you'll have access to arbitarily nested hashes and arrays
that are persistent, and even shareable amongst processes.

         [% USE db = DBM.Deep(file = "my.db" locking = 1 autoflush = 1);
            db.lock;
            db.flintstones = { "flintstone" = ["fred" "wilma"]
                               "rubble" = ["barney" "betty"] };
            db.castaways = ["gilligan" "skipper" "professor" "and the rest" ];
            db.unlock;
         -%]
         ... later, in another file, or even another process ...
         [% db.flintstones.rubble.get(0); %] -- barney
         [% db.castaways.get(3); %] -- and the rest

The docs are inaccurate, because I discovered that DBM::Deep=ARRAY
objects are not "array enough" for a simple .0 and .3 there, but
the rest seems to be working nicely.

        -- 
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Template::Plugin::DBM::Deep released
merlyn (Randal L. Schwartz) 14:59 on 20 May 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52