DB::SPEEDYB - Look up records in a Speedyb constant database
use DB::SPEEDYB;
my $db = DB::SPEEDYB->new(); $db->open('tiny.db') or die "Failed to open db: $!"; my $res = $db->get("Alice"); while (my($k,$v) = $DB->each()) { ... }
This module performs lookups in a Speedyb constant database. Currently, you must create the database with the Python speedyb module.
Speedyb is a high performance, memory-mapped key-value store.
You can share a speedyb handle across forked child processes. There are no locking issues.
Open the file for reading.
Return the value for this key, or undef if not found. Only strings are supported as keys and values.
Iterate over all items in the database, returning $key, $value. Returns undef when items are exhausted.
Open returns undef on failure. get returns undef if they keys is not found.
Written by Asher Blum <asher@wildsparx.com> and Robert Lehr in 2012.
Copyright (C) 2012 Asher Blum and Robert Lehr. All rights reserved. This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself
To install DB::SPEEDYB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DB::SPEEDYB
CPAN shell
perl -MCPAN -e shell install DB::SPEEDYB
For more information on module installation, please visit the detailed CPAN module installation guide.