BerkeleyDB
view release on metacpan or search on metacpan
BerkeleyDB.pod view on Meta::CPAN
=over 5
=item -Home
If present, this parameter should point to an existing directory. Any
files that I<aren't> specified with an absolute path in the sub-systems
that are initialised by the BerkeleyDB::Env class will be assumed to
live in the B<Home> directory.
For example, in the code fragment below the database "fred.db" will be
opened in the directory "/home/databases" because it was specified as a
relative path, but "joe.db" will be opened in "/other" because it was
part of an absolute path.
$env = new BerkeleyDB::Env
-Home => "/home/databases"
...
$db1 = new BerkeleyDB::Hash
-Filename => "fred.db",
BerkeleyDB.pod view on Meta::CPAN
undef $db ;
untie %hash ;
This time only two filters have been used -- we only need to manipulate
the contents of the key, so it wasn't necessary to install any value
filters.
=head1 Using BerkeleyDB with MLDBM
Both BerkeleyDB::Hash and BerkeleyDB::Btree can be used with the MLDBM
module. The code fragment below shows how to open associate MLDBM with
BerkeleyDB::Btree. To use BerkeleyDB::Hash just replace
BerkeleyDB::Btree with BerkeleyDB::Hash.
use strict ;
use BerkeleyDB ;
use MLDBM qw(BerkeleyDB::Btree) ;
use Data::Dumper;
my $filename = 'testmldbm' ;
my %o ;
BerkeleyDB.pod.P view on Meta::CPAN
=over 5
=item -Home
If present, this parameter should point to an existing directory. Any
files that I<aren't> specified with an absolute path in the sub-systems
that are initialised by the BerkeleyDB::Env class will be assumed to
live in the B<Home> directory.
For example, in the code fragment below the database "fred.db" will be
opened in the directory "/home/databases" because it was specified as a
relative path, but "joe.db" will be opened in "/other" because it was
part of an absolute path.
$env = new BerkeleyDB::Env
-Home => "/home/databases"
...
$db1 = new BerkeleyDB::Hash
-Filename => "fred.db",
BerkeleyDB.pod.P view on Meta::CPAN
## intFilter
This time only two filters have been used -- we only need to manipulate
the contents of the key, so it wasn't necessary to install any value
filters.
=head1 Using BerkeleyDB with MLDBM
Both BerkeleyDB::Hash and BerkeleyDB::Btree can be used with the MLDBM
module. The code fragment below shows how to open associate MLDBM with
BerkeleyDB::Btree. To use BerkeleyDB::Hash just replace
BerkeleyDB::Btree with BerkeleyDB::Hash.
use strict ;
use BerkeleyDB ;
use MLDBM qw(BerkeleyDB::Btree) ;
use Data::Dumper;
my $filename = 'testmldbm' ;
my %o ;
( run in 2.679 seconds using v1.01-cache-2.11-cpan-364913b4093 )