[nagiosplug] Update the bundled Params::Validate module

Nagios Plugin Development nagios-plugins at users.sourceforge.net
Mon Aug 19 13:40:32 CEST 2013


 Module: nagiosplug
 Branch: hw/update-pm
 Commit: fc4ddf70a0fbfb9a71f5d6c0f25b82a659327d72
 Author: Holger Weiss <holger at zedat.fu-berlin.de>
   Date: Mon Aug 19 13:30:45 2013 +0200
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=fc4ddf7

Update the bundled Params::Validate module

Building the old version fails with recent Perl releases:

| Validate.xs: In function `get_type':
| Validate.xs:208:5: error: duplicate case value
| Validate.xs:205:5: error: previously used here

---

 perlmods/Params-Validate-0.88.tar.gz |  Bin 79925 -> 0 bytes
 perlmods/Params-Validate-1.08.tar.gz |  Bin 0 -> 103728 bytes
 tools/build_perl_modules             |   23 +++++++++++++++++++----
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/perlmods/Params-Validate-0.88.tar.gz b/perlmods/Params-Validate-0.88.tar.gz
deleted file mode 100644
index 05a0167..0000000
Binary files a/perlmods/Params-Validate-0.88.tar.gz and /dev/null differ
diff --git a/perlmods/Params-Validate-1.08.tar.gz b/perlmods/Params-Validate-1.08.tar.gz
new file mode 100644
index 0000000..418d2a1
Binary files /dev/null and b/perlmods/Params-Validate-1.08.tar.gz differ
diff --git a/tools/build_perl_modules b/tools/build_perl_modules
index 4bdb81b..bcef66f 100755
--- a/tools/build_perl_modules
+++ b/tools/build_perl_modules
@@ -65,8 +65,15 @@ foreach my $tarball (@tarballs) {
 		unless (-e $dir) {
 			system("gunzip -c $tarball | tar -xf -") == 0 or die "Cannot extract $tarball";
 			chdir $dir or die "Can't chdir into $dir";
-			system("perl Makefile.PL PREFIX=$destdir INSTALLDIRS=site LIB=$destdir/lib") == 0 or die "Can't run perl Makefile.PL";
-			system("make") == 0 or die "Can't run make";
+			if (-e "Makefile.PL") {
+				system("perl Makefile.PL PREFIX=$destdir INSTALLDIRS=site LIB=$destdir/lib") == 0
+					or die "Can't run perl Makefile.PL";
+				system("make") == 0 or die "Can't run make";
+			} else {
+				system("perl Build.PL --prefix $destdir --installdirs site --install_path lib=$destdir/lib") == 0
+					or die "Can't run perl Build.PL";
+				system("./Build.PL") == 0 or die "Can't run ./Build";
+			}
 			chdir $topdir or die "Can't chdir to top";;
 		}
 	}
@@ -79,10 +86,18 @@ foreach my $tarball (@tarballs) {
 	$ENV{PERL5LIB}=join(":", @dirs);
 
 	if ($opts->{t}) {
-		system("make test") == 0 or die "Can't run make test failed";
+		if (-e "Makefile") {
+			system("make test") == 0 or die "Can't run make test failed";
+		} else {
+			system("./Build test") == 0 or die "./Build test failed";
+		}
 	}
 	if ($opts->{i}) {
-		system("make install SITEPREFIX=$destdir") == 0 or die "Can't run make install";
+		if (-e "Makefile") {
+			system("make install SITEPREFIX=$destdir") == 0 or die "Can't run make install";
+		} else {
+			system("./Build install") == 0 or die "Can't run ./Build install";
+		}
 	}
 	chdir $topdir or die "Can't go back to $topdir";
 }





More information about the Commits mailing list