X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FPrefix.pm;h=da173ce175eb631a55bdfe50cf245869c9542279;hb=7abfb64b58d106d8352eb365b63cec23669c4e0d;hp=3f1341ad6fd169bbbf5a8ceaee42b214fab1e945;hpb=3f1a7d80058c501bce43c8a4a6c6d2f4f530ab0d;p=spider.git diff --git a/perl/Prefix.pm b/perl/Prefix.pm index 3f1341ad..da173ce1 100644 --- a/perl/Prefix.pm +++ b/perl/Prefix.pm @@ -76,10 +76,10 @@ sub load } # tie the main prefix database - $db = tie(%pre, "DB_File", undef, O_RDWR|O_CREAT, 0664, $DB_BTREE) or confess "can't tie \%pre ($!)"; - my $out = $@ if $@; - do "$main::data/prefix_data.pl" if !$out; - $out = $@ if $@; + eval {$db = tie(%pre, "DB_File", undef, O_RDWR|O_CREAT, 0664, $DB_BTREE);}; + my $out = "$@($!)" if !$db || $@ ; + eval {do "$main::data/prefix_data.pl" if !$out; }; + $out .= $@ if $@; $lru = LRU->newbase('Prefix', $lrusize); return $out;