adding support for multiple alternate perlmodule tests
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 2 Nov 2007 00:28:03 +0000 (00:28 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 2 Nov 2007 00:28:03 +0000 (00:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@7969 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/support-scripts/settings-tester.pl

index 17e8912..0ff66ef 100755 (executable)
@@ -30,9 +30,24 @@ GetOptions(
 
 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
 Class::DBI::AbstractSearch
 Template
 DBD::Pg
-Net::Z3950
-Net::Z3950::ZOOM
+Net::Z3950 Net::Z3950::ZOOM
 MARC::Record
 MARC::Charset
 MARC::File::XML