BerkeleyDB 
Author Message
 BerkeleyDB

Has anyone managed to install and use BerkeleyDB v.02?  After having
installed it, I am attempting to invoke it with:

use BerkeleyDB;      # This one's free with perl and should be there
$database=tie(%db, 'BerkeleyDB', $file, O_RDWR|O_CREAT, 0660);

When I do so, I get:


The error is because of the SECOND line. BerkeleyDB seems to be found
ok.  

-Evan Clark
--
"A verbal contract isn't worth the paper it's written on."
-Samual Goldwyn



Fri, 22 Sep 2000 03:00:00 GMT  
 BerkeleyDB

[Posted & Mailed]

Quote:

>Has anyone managed to install and use BerkeleyDB v.02?  After having
>installed it, I am attempting to invoke it with:

>use BerkeleyDB;      # This one's free with perl and should be there
>$database=tie(%db, 'BerkeleyDB', $file, O_RDWR|O_CREAT, 0660);

>When I do so, I get:


>The error is because of the SECOND line. BerkeleyDB seems to be found
>ok.

Try

    $database = tie %db,  'BerkeleyDB::Hash' ,
                                        -Filename => $file,
                                        -Flags        => DB_CREAT,
                                        -Mode        => 0666;

Until I get round to doing some documentation, look at the files in the "t"
directory for examples of how to use BerkeleyDB.

Paul



Sat, 23 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. BerkeleyDB 3.1.14 and BerkeleyDB-0.11 module

2. Perl 5.005_03, BerkeleyDB 2.7.7, BerkeleyDB-0.06, and Solaris7

3. Perl 5.005_03, BerkeleyDB 2.7.7, BerkeleyDB-0.06, and Solaris7

4. BerkeleyDB vs Perl's DB_File

5. Q: locking with BerkeleyDB.pm

6. BerkeleyDB and MLDBM

7. Null-termination in BerkeleyDB

8. BerkeleyDB

9. BerkeleyDB Toolkit

10. BerkeleyDB for NT

11. BerkeleyDB file locking

12. BerkeleyDB locking problem with multiple writers/readers

 

 
Powered by phpBB® Forum Software