639 |
my $lookup_file = $cfg -> val($database, 'lookup_newfile'); # optional |
my $lookup_file = $cfg -> val($database, 'lookup_newfile'); # optional |
640 |
if ($lookup_file) { |
if ($lookup_file) { |
641 |
#tie %lhash, 'GDBM_File', $lookup_file, &GDBM_NEWDB, 0644; |
#tie %lhash, 'GDBM_File', $lookup_file, &GDBM_NEWDB, 0644; |
642 |
|
if (! -e $lookup_file) { |
643 |
|
open(LOOKUP, "> $lookup_file") || die "can't create $lookup_file': $!"; |
644 |
|
close(LOOKUP); |
645 |
|
} |
646 |
tie %lhash, 'TDB_File', $lookup_file, TDB_CLEAR_IF_FIRST, O_RDWR, 0644; |
tie %lhash, 'TDB_File', $lookup_file, TDB_CLEAR_IF_FIRST, O_RDWR, 0644; |
647 |
print STDERR "creating lookup file '$lookup_file'\n"; |
print STDERR "creating lookup file '$lookup_file'\n"; |
648 |
# delete memory cache for lookup file |
# delete memory cache for lookup file |