diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-11-19 10:33:19 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-11-19 10:33:19 +0100 |
commit | fea10eefe36c3f759aa2e5a7b5b61a58df1c3b4a (patch) | |
tree | 317067d8c41848619a1f905c384b6af21efeaaee /lib | |
parent | 0755133217cd373f6b59bb10eb3a2ec7c0fe7a66 (diff) | |
download | App-ArchLinux-PackagerTools-fea10eefe36c3f759aa2e5a7b5b61a58df1c3b4a.tar.gz App-ArchLinux-PackagerTools-fea10eefe36c3f759aa2e5a7b5b61a58df1c3b4a.tar.xz |
Use zcat instead of IO::Zlib
Apparently IO::Zlib is quite slow compared to zcat and other modules
aren't supposed to be much faster. Also this gives us free
multithreading.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/App/ArchLinux/PackagerTools/CPAN.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/App/ArchLinux/PackagerTools/CPAN.pm b/lib/App/ArchLinux/PackagerTools/CPAN.pm index 0bf201f..4faf0d6 100644 --- a/lib/App/ArchLinux/PackagerTools/CPAN.pm +++ b/lib/App/ArchLinux/PackagerTools/CPAN.pm @@ -6,7 +6,6 @@ use CPAN::DistnameInfo; use CPANPLUS::Backend; use Carp; use Function::Parameters; -use IO::Zlib; use Log::Any qw($log); use Syntax::Keyword::Try; use version; @@ -140,7 +139,7 @@ method _build_dist_index() { $log->debug("Building index..."); my $packages_file = "$ENV{HOME}/.cpanplus/02packages.details.txt.gz"; - my $fh = IO::Zlib->new($packages_file, 'r'); + open my $fh, '-|', 'zcat', $packages_file; my %seen; my $line_number = 0; while (<$fh>) { |