gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 105/205: mkhelp: disable compression if the perl gz


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 105/205: mkhelp: disable compression if the perl gzip module is unavailable
Date: Thu, 20 Apr 2017 16:20:45 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.

commit ae22034d0d711881b0cbf1e8be3090cad486bb97
Author: Dan Fandrich <address@hidden>
AuthorDate: Thu Mar 23 21:11:41 2017 +0100

    mkhelp: disable compression if the perl gzip module is unavailable
    
    This is nowadays included with the base perl distribution, but wasn't
    prior to about perl 5.14
---
 src/mkhelp.pl | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/mkhelp.pl b/src/mkhelp.pl
index 8b7f72157..4b540744c 100644
--- a/src/mkhelp.pl
+++ b/src/mkhelp.pl
@@ -113,8 +113,19 @@ print <<HEAD
 HEAD
     ;
 if($c) {
-    # if compressed
-    use IO::Compress::Gzip;
+    # If compression requested, check that the Gzip module is available
+    # or else disable compression
+    $c = eval
+    {
+      require IO::Compress::Gzip;
+      IO::Compress::Gzip->import();
+      1;
+    };
+    print STDERR "Warning: compression requested but Gzip is not available\n" 
if (!$c)
+}
+
+if($c)
+{
     my $content = join("", @out);
     my $gzippedContent;
     IO::Compress::Gzip::gzip(

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]