[open-ils-commits] r7969 - trunk/Open-ILS/src/support-scripts

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Nov 1 20:42:58 EDT 2007


Author: miker
Date: 2007-11-01 20:28:03 -0400 (Thu, 01 Nov 2007)
New Revision: 7969

Modified:
   trunk/Open-ILS/src/support-scripts/settings-tester.pl
Log:
adding support for multiple alternate perlmodule tests

Modified: trunk/Open-ILS/src/support-scripts/settings-tester.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/settings-tester.pl	2007-11-02 00:09:54 UTC (rev 7968)
+++ trunk/Open-ILS/src/support-scripts/settings-tester.pl	2007-11-02 00:28:03 UTC (rev 7969)
@@ -30,9 +30,24 @@
 
 while (my $mod = <DATA>) {
 	chomp $mod;
-	warn "Please install $mod\n" unless ($mod->use);
-	$perloutput .= "Please install the $mod Perl module.\n";
-	print "$mod version ".${$mod."::VERSION"}."\n" unless ($@);
+	my @list = split / /, $mod;
+
+	my $ok = 0;
+	for my $m (@list) {
+		$ok++ if ($m->use);
+		print "$m version ".${$m."::VERSION"}."\n" unless ($@);
+	}
+
+	unless ($ok) {
+		if (@list == 1) {
+			warn "Please install $mod\n";
+			$perloutput .= "Please install the $mod Perl module.\n";
+		} else {
+			warn "Please install one of the following modules: $mod\n";
+			$perloutput .= "Please install one of the following modules: $mod\n";
+		}
+	}
+			
 }
 
 use OpenSRF::Transport::SlimJabber::Client;
@@ -285,8 +300,7 @@
 Class::DBI::AbstractSearch
 Template
 DBD::Pg
-Net::Z3950
-Net::Z3950::ZOOM
+Net::Z3950 Net::Z3950::ZOOM
 MARC::Record
 MARC::Charset
 MARC::File::XML



More information about the open-ils-commits mailing list