[interchange-cvs] interchange - jon modified lib/Vend/DbSearch.pm
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Wed Oct 17 16:11:00 2001
User: jon
Date: 2001-10-17 20:10:46 GMT
Modified: lib/Vend Tag: STABLE_4_8-branch DbSearch.pm
Log:
Have mv_base_directory default to ProductDir setting, not first
ProductFiles setting.
Revision Changes Path
No revision
No revision
2.0.2.1 +8 -3 interchange/lib/Vend/DbSearch.pm
rev 2.0.2.1, prev_rev 2.0
Index: DbSearch.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/DbSearch.pm,v
retrieving revision 2.0
retrieving revision 2.0.2.1
diff -u -u -r2.0 -r2.0.2.1
--- DbSearch.pm 2001/07/18 02:23:13 2.0
+++ DbSearch.pm 2001/10/17 20:10:46 2.0.2.1
@@ -1,6 +1,6 @@
# Vend::DbSearch - Search indexes with Interchange
#
-# $Id: DbSearch.pm,v 2.0 2001/07/18 02:23:13 jon Exp $
+# $Id: DbSearch.pm,v 2.0.2.1 2001/10/17 20:10:46 jon Exp $
#
# Adapted for use with Interchange from Search::TextSearch
#
@@ -26,7 +26,7 @@
@ISA = qw(Vend::Search);
-$VERSION = substr(q$Revision: 2.0 $, 10);
+$VERSION = substr(q$Revision: 2.0.2.1 $, 10);
use Search::Dict;
use strict;
@@ -66,9 +66,14 @@
sub init {
my ($s, $options) = @_;
+ # autovivify references of nested data structures we use below, since they
+ # don't yet exist at daemon startup time before configuration is done
+ $Vend::Cfg->{ProductFiles}[0];
+ $::Variable->{MV_DEFAULT_SEARCH_TABLE};
+
@{$s}{keys %Default} = (values %Default);
$s->{mv_all_chars} = [1];
- $s->{mv_base_directory} = $Vend::Cfg->{ProductFiles}[0];
+ $s->{mv_base_directory} = $Vend::Cfg->{ProductDir};
$s->{mv_begin_string} = [];
$s->{mv_case} = [];
$s->{mv_column_op} = [];