X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FPrefix.pm;h=da173ce175eb631a55bdfe50cf245869c9542279;hb=dc305f992d75a6b35edda9e1aefab510a3ed617e;hp=3f1341ad6fd169bbbf5a8ceaee42b214fab1e945;hpb=ee822fc8bbe6985f708cca37ce3953b83651e542;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;