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

interchange-core@interchange.redhat.com interchange-core@interchange.redhat.com
Tue Feb 5 22:49:00 2002


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

Revision  Changes    Path
No                   revision



No                   revision



2.0.2.2   +5 -5      interchange/lib/Vend/Search.pm


rev 2.0.2.2, prev_rev 2.0.2.1
Index: Search.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Search.pm,v
retrieving revision 2.0.2.1
retrieving revision 2.0.2.2
diff -u -r2.0.2.1 -r2.0.2.2
--- Search.pm	24 Jan 2002 05:07:01 -0000	2.0.2.1
+++ Search.pm	6 Feb 2002 03:48:36 -0000	2.0.2.2
@@ -1,6 +1,6 @@
 # Vend::Search - Base class for search engines
 #
-# $Id: Search.pm,v 2.0.2.1 2002/01/24 05:07:01 jon Exp $
+# $Id: Search.pm,v 2.0.2.2 2002/02/06 03:48:36 mheins Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -21,7 +21,7 @@
 
 package Vend::Search;
 
-$VERSION = substr(q$Revision: 2.0.2.1 $, 10);
+$VERSION = substr(q$Revision: 2.0.2.2 $, 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
 				}
@@ -715,10 +715,10 @@
 		}
 #::logDebug("coderef=" . ::uneval_it(\@code));
 
-		undef $f if $s->{mv_search_relate} =~ s/\bor\b/or/ig;
 		DOLIMIT: {
 #::logDebug(::uneval_it({%$s}));
 #::logDebug("do_limit.");
+			undef $f, last DOLIMIT unless $s->{regex_specs};
 			last DOLIMIT if $f;
 #::logDebug("do_limit past f.");
 			last DOLIMIT if $s->{mv_small_data};