summaryrefslogtreecommitdiff
path: root/lib/Archive/Tar/Constant.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Archive/Tar/Constant.pm')
-rw-r--r--lib/Archive/Tar/Constant.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Archive/Tar/Constant.pm b/lib/Archive/Tar/Constant.pm
index f7f0f6d29a..3112d59baa 100644
--- a/lib/Archive/Tar/Constant.pm
+++ b/lib/Archive/Tar/Constant.pm
@@ -62,7 +62,12 @@ use constant MAGIC => "ustar";
use constant TAR_VERSION => "00";
use constant LONGLINK_NAME => '././@LongLink';
-use constant ZLIB => do { eval { require IO::Zlib }; $@ ? 0 : 1 };
+ ### allow ZLIB to be turned off using ENV
+ ### DEBUG only
+use constant ZLIB => do { !$ENV{'PERL5_AT_NO_ZLIB'} and
+ eval { require IO::Zlib };
+ $ENV{'PERL5_AT_NO_ZLIB'} || $@ ? 0 : 1 };
+
use constant GZIP_MAGIC_NUM => qr/^(?:\037\213|\037\235)/;
use constant CAN_CHOWN => do { ($> == 0 and $^O ne "MacOS" and $^O ne "MSWin32") };