if (-e "$main::local_data") {
$tfn = "$main::data/$ifn";
- if (-e $tfn && -e $ofn) {
+ if ((-e $tfn) && (-e $ofn)) {
$ofn = $tfn if -M $ofn < -M $tfn;
- } elsif (-e tfn) {
- $ofn = $tfn;
+ } else {
+ $ofn = $tfn if -e $tfn;
}
}
eval {$db = tie(%pre, "DB_File", undef, O_RDWR|O_CREAT, 0664, $DB_BTREE);};
my $out = "$@($!)" if !$db || $@ ;
my $fn = localdata("prefix_data.pl");
+ die "Prefix.pm: cannot find $fn, have you run /spider/perl/create_prefix.pl?" unless -e $fn;
+
eval {do $fn if !$out; };
$out .= $@ if $@;
$lru = LRU->newbase('Prefix', $lrusize);