[interchange-cvs] interchange - racke modified lib/Vend/Swish.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Tue Oct 4 08:38:21 EDT 2005


User:      racke
Date:      2005-10-04 12:38:21 GMT
Modified:  lib/Vend Swish.pm
Log:
check if swish command is available

Revision  Changes    Path
1.5       +5 -4      interchange/lib/Vend/Swish.pm


rev 1.5, prev_rev 1.4
Index: Swish.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Swish.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Swish.pm	3 Aug 2005 19:33:39 -0000	1.4
+++ Swish.pm	4 Oct 2005 12:38:20 -0000	1.5
@@ -1,6 +1,6 @@
 # Vend::Swish - Search indexes with Swish-e
 #
-# $Id: Swish.pm,v 1.4 2005/08/03 19:33:39 jon Exp $
+# $Id: Swish.pm,v 1.5 2005/10/04 12:38:20 racke Exp $
 #
 # Adapted from Vend::Glimpse
 #
@@ -25,7 +25,7 @@
 require Vend::Search;
 @ISA = qw(Vend::Search);
 
-$VERSION = substr(q$Revision: 1.4 $, 10);
+$VERSION = substr(q$Revision: 1.5 $, 10);
 use strict;
 
 sub array {
@@ -136,8 +136,9 @@
 	$s->{mv_return_delim} = $s->{mv_index_delim}
 		unless defined $s->{mv_return_delim};
 
-	return $s->search_error("Search with swish, no swish configured.")
-		if ! $s->{swish_cmd};
+	unless ($s->{swish_cmd} && -x $s->{swish_cmd}) {
+		return $s->search_error("Invalid swish command $s->{swish_cmd}");
+	}
 
 	@specs = @{$s->{mv_searchspec}};
 








More information about the interchange-cvs mailing list