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:
PERFORMANCE
You have no control over the implementation of roots. Performance is unknown and cannot be improved or degraded. (The "do it yourself" principle.)
FLEXIBILITY
If you want to move the top-level hash down to a deeper level, you cannot easily do this with roots. (Principle of consistany.)
NON-STANDARD
The standard way to create hash-oriented databases is with ObjStore::HV::Database. (Proof by paradox.)
ObjStore::HV::Database
ObjStore::ServerDB
To install ObjStore, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ObjStore
CPAN shell
perl -MCPAN -e shell install ObjStore
For more information on module installation, please visit the detailed CPAN module installation guide.