mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
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
This commit is contained in:
parent
f355a92cd5
commit
ae22034d0d
@ -113,8 +113,19 @@ print <<HEAD
|
|||||||
HEAD
|
HEAD
|
||||||
;
|
;
|
||||||
if($c) {
|
if($c) {
|
||||||
# if compressed
|
# If compression requested, check that the Gzip module is available
|
||||||
use IO::Compress::Gzip;
|
# 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 $content = join("", @out);
|
||||||
my $gzippedContent;
|
my $gzippedContent;
|
||||||
IO::Compress::Gzip::gzip(
|
IO::Compress::Gzip::gzip(
|
||||||
|
Loading…
Reference in New Issue
Block a user