DirDBUse a directory as a persistence back end for (multi-level) (blessed) hashes (that may contain array references) (and can be advisorialy locked) | |
Download |
DirDB Ranking & Summary
Advertisement
- License:
- GPL
- Price:
- FREE
- Publisher Name:
- David Nicol
- Publisher web site:
- http://search.cpan.org/~davidnico/
DirDB Tags
DirDB Description
Use a directory as a persistence back end for (multi-level) (blessed) hashes (that may contain array references) (and can be advisorialy locked) DirDB is a Perl module that lets you access a directory as a hash. The final directory will be created, but not the whole path to it. It is similar to Tie::Persistent, but different in that all accesses are immediately reflected in the file system, and very little is kept in perl memory. (your OS's file cacheing takes care of that -- DirDB only hits the disk a lot on poorly designed operating systems without file system caches, which isn't any of them any more.)The empty string, used as a key, will be translated into ' EMPTY' for purposes of storage and retrieval. File names beginning with a space are reserved for metadata for subclasses, such as object type or array size or whatever. Key names beginning with a space get an additional space prepended to the name for purposes of naming the file to store that value.SYNOPSIS use DirDB; tie my %session, 'DirDB', "./data/session"; $session{$sessionID}{email} = get_emailaddress(); $session{$sessionID}{objectcache}{fribble} ||= new fribble; # use Tie::File; # see below -- any array-in-a-filesystem representation # is supported push @{$session{$sessionID}{events}}, $event; Requirements: · Perl
DirDB Related Software