From f65f03e6a0fe20661e1c09ce4412264ce8c15309 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 17 Dec 2004 10:21:15 +0000 Subject: Simplify optional module loading --- Packdrakeng.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Packdrakeng.pm b/Packdrakeng.pm index adf62e9..f860557 100644 --- a/Packdrakeng.pm +++ b/Packdrakeng.pm @@ -138,13 +138,13 @@ sub choose_compression_method { $test_method =~ m/^gzip|^gunzip/ and do { $pack->{compress_method} ||= "gzip"; if (!$pack->{force_extern}) { - eval { require Packdrakeng::zlib; }; - if (! $@) { - $pack->{subcompress} = \&Packdrakeng::zlib::gzip_compress; - $pack->{subuncompress} = \&Packdrakeng::zlib::gzip_uncompress; - $pack->{use_extern} = 0; - $pack->{direct_write} = 1; - } + eval { + require Packdrakeng::zlib; + $pack->{subcompress} = \&Packdrakeng::zlib::gzip_compress; + $pack->{subuncompress} = \&Packdrakeng::zlib::gzip_uncompress; + $pack->{use_extern} = 0; + $pack->{direct_write} = 1; + }; } }; if (!$pack->{noargs}) { -- cgit v1.2.1