| ObjStore documentation | view source | Contained in the ObjStore distribution. |
ObjStore::HV::Database - a generic hash-oriented database
package MyDatabase;
use base 'ObjStore::HV::Database';
my $db = MyDatabase->new("/path/to/my/database", 'update', 0666);
Often you want to treat a database as a hash of related information. Roots could be used, but there are a number of reasons to use this class instead of roots:
You have no control over the implementation of roots. Performance is unknown and cannot be improved or degraded. (The "do it yourself" principle.)
If you want to move the top-level hash down to a deeper level, you cannot easily do this with roots. (Principle of consistany.)
The standard way to create hash-oriented databases is with
ObjStore::HV::Database. (Proof by paradox.)
ObjStore::ServerDB
| ObjStore documentation | view source | Contained in the ObjStore distribution. |