[interchange-cvs] interchange - heins modified lib/Vend/Search.pm

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Tue Feb 5 22:50:01 2002


User:      heins
Date:      2002-02-06 03:49:30 GMT
Modified:  lib/Vend Search.pm
Log:
	* Fix op=em as only spec bug reported by John Young.

Revision  Changes    Path
2.4       +5 -4      interchange/lib/Vend/Search.pm


rev 2.4, prev_rev 2.3
Index: Search.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Search.pm,v
retrieving revision 2.3
retrieving revision 2.4
diff -u -r2.3 -r2.4
--- Search.pm	1 Feb 2002 03:20:10 -0000	2.3
+++ Search.pm	6 Feb 2002 03:49:30 -0000	2.4
@@ -1,6 +1,6 @@
 # Vend::Search - Base class for search engines
 #
-# $Id: Search.pm,v 2.3 2002/02/01 03:20:10 mheins Exp $
+# $Id: Search.pm,v 2.4 2002/02/06 03:49:30 mheins Exp $
 #
 # Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -21,7 +21,7 @@
 
 package Vend::Search;
 
-$VERSION = substr(q$Revision: 2.3 $, 10);
+$VERSION = substr(q$Revision: 2.4 $, 10);
 
 use strict;
 use vars qw($VERSION);
@@ -255,9 +255,9 @@
 				if(	$s->{mv_column_op}[$i] =~ /([=][~]|rm|em)/ ) {
 					$specs[$i] = quotemeta $specs[$i]
 						if $s->{mv_all_chars}[$i];
-					$s->{regex_specs} = []
-						unless $s->{regex_specs};
 					last COLOP if $s->{mv_begin_string}[$i];
+					last COLOP if $s->{mv_column_op}[$i] eq 'em';
+					$s->{regex_specs} ||= [];
 					$specs[$i] =~ /(.*)/;
 					push @{$s->{regex_specs}}, $1
 				}
@@ -740,6 +740,7 @@
 #::logDebug("coderef=" . ::uneval_it(\@code));
 
 		undef $f if $s->{mv_search_relate} =~ s/\bor\b/or/ig;
+		undef $f unless $s->{regex_specs} or $s->{eq_specs};
 		DOLIMIT: {
 #::logDebug(::uneval_it({%$s}));
 #::logDebug("do_limit.");