grondilu has asked for the wisdom of the Perl Monks concerning the following question:
I'm kind of confused in trying to use BerkeleyDB with an environnement
Here is the simplest example I could figure out:
# creating a dummy db first use DB_File; tie my %h, "DB_File", "/tmp/test.db"; $h{foo} = "bar"; untie %h; # now trying to read it use BerkeleyDB; my $db = new BerkeleyDB::Hash -Env => BerkeleyDB::Env->new(-Home => "/tmp"), -Filename => "test.db" or die "could not open database";
This always raises the "could not open database" exception.
What am I missing?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: can't manage to use BerkeleyDB::Env
by Anonymous Monk on Aug 23, 2012 at 10:23 UTC | |
by grondilu (Friar) on Aug 23, 2012 at 10:34 UTC | |
by Anonymous Monk on Aug 23, 2012 at 10:45 UTC | |
by grondilu (Friar) on Aug 23, 2012 at 10:54 UTC | |
by Anonymous Monk on Aug 23, 2012 at 11:24 UTC | |
Re: can't manage to use BerkeleyDB::Env
by flexvault (Monsignor) on Aug 23, 2012 at 14:24 UTC | |
by grondilu (Friar) on Aug 23, 2012 at 21:14 UTC |
Back to
Seekers of Perl Wisdom