switch back to GDBM_File which is included in recent
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 3 Aug 2008 06:31:00 +0000 (06:31 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 3 Aug 2008 06:31:00 +0000 (06:31 +0000)
Debian, and TDB_File won't compile against tdb-dev

git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@775 13eb9ef6-21d5-0310-b721-a9d68796d827

INSTALL
all2xml.pl

diff --git a/INSTALL b/INSTALL
index 7da6934..bd6e769 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -57,7 +57,7 @@ don't work for you.
        SWISH::API
        XML::Simple
        Text::Iconv
        SWISH::API
        XML::Simple
        Text::Iconv
-       TDB_File
+       GDBM_File
        HTML::Entities          (part of HTML::Parser)
 
    CPAN shell will also download some more modules to satisfy dependencies.
        HTML::Entities          (part of HTML::Parser)
 
    CPAN shell will also download some more modules to satisfy dependencies.
@@ -91,7 +91,6 @@ don't work for you.
        libhtml-template-perl
        libxml-simple-perl
        libtext-iconv-perl
        libhtml-template-perl
        libxml-simple-perl
        libtext-iconv-perl
-       tdb-dev                 (for TDB_File module later)
        libhtml-parser-perl
 
    and install following packages by hand from CPAN
        libhtml-parser-perl
 
    and install following packages by hand from CPAN
index a7e7ade..e87fdbf 100755 (executable)
@@ -8,9 +8,9 @@ use XML::Simple;
 use Text::Iconv;
 use Config::IniFiles;
 use Encode;
 use Text::Iconv;
 use Config::IniFiles;
 use Encode;
-#use GDBM_File;
+use GDBM_File;
 use Fcntl;     # for O_RDWR
 use Fcntl;     # for O_RDWR
-use TDB_File;
+#use TDB_File;
 use Carp;
 
 $|=1;
 use Carp;
 
 $|=1;
@@ -673,12 +673,12 @@ foreach my $database ($cfg->Sections) {
        # create new lookup file
        my $lookup_file = $cfg -> val($database, 'lookup_newfile'); # optional
        if ($lookup_file) {
        # create new lookup file
        my $lookup_file = $cfg -> val($database, 'lookup_newfile'); # optional
        if ($lookup_file) {
-               #tie %lhash, 'GDBM_File', $lookup_file, &GDBM_NEWDB, 0644;
                if (! -e $lookup_file) {
                        open(LOOKUP, "> $lookup_file") || die "can't create $lookup_file': $!";
                        close(LOOKUP);
                }
                if (! -e $lookup_file) {
                        open(LOOKUP, "> $lookup_file") || die "can't create $lookup_file': $!";
                        close(LOOKUP);
                }
-               tie %lhash, 'TDB_File', $lookup_file, TDB_CLEAR_IF_FIRST, O_RDWR, 0644;
+               tie %lhash, 'GDBM_File', $lookup_file, &GDBM_NEWDB, 0644;
+               #tie %lhash, 'TDB_File', $lookup_file, TDB_CLEAR_IF_FIRST, O_RDWR, 0644;
                print STDERR "creating lookup file '$lookup_file'\n";
                # delete memory cache for lookup file
                delete $cache->{lhash};
                print STDERR "creating lookup file '$lookup_file'\n";
                # delete memory cache for lookup file
                delete $cache->{lhash};
@@ -687,8 +687,8 @@ foreach my $database ($cfg->Sections) {
        # open existing lookup file
        $lookup_file = $cfg -> val($database, 'lookup_open'); # optional
        if ($lookup_file) {
        # open existing lookup file
        $lookup_file = $cfg -> val($database, 'lookup_open'); # optional
        if ($lookup_file) {
-               #tie %lhash, 'GDBM_File', $lookup_file, &GDBM_READER, 0644;
-               tie %lhash, 'TDB_File', $lookup_file, TDB_DEFAULT, O_RDWR, 0644;
+               tie %lhash, 'GDBM_File', $lookup_file, &GDBM_READER, 0644;
+               #tie %lhash, 'TDB_File', $lookup_file, TDB_DEFAULT, O_RDWR, 0644;
                print STDERR "opening lookup file '$lookup_file'\n";
        }
 
                print STDERR "opening lookup file '$lookup_file'\n";
        }