%reverse_db %reverse_chardb
%er_alias $er_prefix_re
$atr $idc
+ $omegadb_path
);
our @ISA = qw(Exporter);
%reverse_db %reverse_chardb
$idc
%er_alias $er_prefix_re
+ $omegadb_path
&get_db
&get_reverse_db
&get_char_attribute
# Preloaded methods go here.
+$omegadb_path="/usr/local/lib/chise/omega";
+
my $DB_HOME="";
unless($DB_HOME){
if(-e '/usr/local/lib/chise/chise-db'){
return 1 if(defined(%{$chardb{$atr}}));
if(defined($db{$atr}) and -f $db{$atr}){
tie %{$chardb{$atr}}, "BerkeleyDB::Hash",
- -Filename => $db{$atr};
+ -Filename => $db{$atr},
+ -Flags => DB_RDONLY;
}else{
return undef;
}
return 1 if(defined(%{$reverse_chardb{$atr}}));
if(defined($reverse_db{$atr}) and -f $reverse_db{$atr}){
tie %{$reverse_chardb{$atr}}, "BerkeleyDB::Hash",
- -Filename => $reverse_db{$atr};
+ -Filename => $reverse_db{$atr},
+ -Flags => DB_RDONLY;
}else{
return undef;
}