diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-12-17 10:21:15 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-12-17 10:21:15 +0000 |
commit | f65f03e6a0fe20661e1c09ce4412264ce8c15309 (patch) | |
tree | 7e954b7ac7935d18470c224d15fd881fa7a9b37f | |
parent | 8570764842ecbfb67f4b26b953c94eba42f36dbe (diff) | |
download | rpmtools-f65f03e6a0fe20661e1c09ce4412264ce8c15309.tar rpmtools-f65f03e6a0fe20661e1c09ce4412264ce8c15309.tar.gz rpmtools-f65f03e6a0fe20661e1c09ce4412264ce8c15309.tar.bz2 rpmtools-f65f03e6a0fe20661e1c09ce4412264ce8c15309.tar.xz rpmtools-f65f03e6a0fe20661e1c09ce4412264ce8c15309.zip |
Simplify optional module loading
-rw-r--r-- | Packdrakeng.pm | 14 |
1 files 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}) { |