projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added the state filtering stuff
[spider.git]
/
perl
/
USDB.pm
diff --git
a/perl/USDB.pm
b/perl/USDB.pm
index ed519b4b86aa5e2cc03d6222ffcb824586774fbe..89cd9fe5661c9e1988e6e4a2954f58fdf9a2d85f 100644
(file)
--- a/
perl/USDB.pm
+++ b/
perl/USDB.pm
@@
-28,7
+28,12
@@
$dbfn = "$main::data/usdb.v1";
sub init
{
end();
sub init
{
end();
- tie %db, 'DB_File', $dbfn and $present = 1;
+ if (tie %db, 'DB_File', $dbfn, O_RDONLY, 0664, $DB_BTREE) {
+ $present = 1;
+ dbg("US Database loaded");
+ } else {
+ dbg("US Database not loaded");
+ }
}
sub end
}
sub end
@@
-122,6
+127,7
@@
sub load
untie %dbn;
rename "$dbfn.new", $dbfn;
untie %dbn;
rename "$dbfn.new", $dbfn;
+ return ();
}
1;
}
1;