[interchange-cvs] interchange - jon modified lib/Vend/Glimpse.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Fri Apr 9 15:39:55 EDT 2004


User:      jon
Date:      2004-04-09 19:39:55 GMT
Modified:  lib/Vend Glimpse.pm
Log:
Fix broken Glimpse module:

(1) Call to allowed_file() failed because Vend::File wasn't imported.

(2) Call to get_return() had wrong option and returned a ref.

And only return hash when explicitly requested, as with Vend::TextSearch.

Revision  Changes    Path
2.10      +7 -4      interchange/lib/Vend/Glimpse.pm


rev 2.10, prev_rev 2.9
Index: Glimpse.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Glimpse.pm,v
retrieving revision 2.9
retrieving revision 2.10
diff -u -u -r2.9 -r2.10
--- Glimpse.pm	18 Jun 2003 17:34:44 -0000	2.9
+++ Glimpse.pm	9 Apr 2004 19:39:55 -0000	2.10
@@ -1,6 +1,6 @@
 # Vend::Glimpse - Search indexes with Glimpse
 #
-# $Id: Glimpse.pm,v 2.9 2003/06/18 17:34:44 jon Exp $
+# $Id: Glimpse.pm,v 2.10 2004/04/09 19:39:55 jon Exp $
 #
 # Adapted for use with Interchange from Search::Glimpse
 #
@@ -26,8 +26,11 @@
 require Vend::Search;
 @ISA = qw(Vend::Search);
 
-$VERSION = substr(q$Revision: 2.9 $, 10);
+$VERSION = substr(q$Revision: 2.10 $, 10);
 use strict;
+use Vend::File;
+use Vend::Util;
+
 
 sub array {
 	my ($s, $opt) = @_;
@@ -324,7 +327,7 @@
 		$s->hash_fields($s->{mv_field_names}, qw/mv_sort_field/);
 #::logDebug("gsearch after hash fields: self=" . ::Vend::Util::uneval_it({%$s}));
 		$s->sort_search_return(\@out);
-		$delayed_return = $s->get_return(1,1);
+		$delayed_return = $s->get_return(1);
 		@out = map { $delayed_return->($_) } @out;
 	}
 #::logDebug("after delayed return: self=" . ::Vend::Util::uneval_it({%$s}));
@@ -356,7 +359,7 @@
 		@out = map { join $s->{mv_return_delim}, @$_ } @out;
 		$s->{mv_results} = join $s->{mv_record_delim}, @out;
 	}
-	else {
+	elsif($s->{mv_return_reference} eq 'HASH') {
 		my $col = scalar @{$s->{mv_return_fields}};
 		my @col;
 		my @names;








More information about the interchange-cvs mailing list