Subject: | Remove dependency on PerlIO::Util |
This module depends on PerlIO::Util, but it only uses it to export PerlIO::get_layers method to IO::Handle package. PerlIO::Util fails tests on perl > 5.16, I tried it on 5.20.2 and t/08_taint.t segfaulted. It seems that the easiest thing to do is to drop the dependency on PerlIO::Util. I attached the patch that does it.
--
Pavel Shaydo
Subject: | remove-dependency-on-PerlIO-Util.patch |
diff --git a/Build.PL b/Build.PL
index 7795a5c..62b0454 100755
--- a/Build.PL
+++ b/Build.PL
@@ -7,7 +7,6 @@ Module::Build->new
perl => 5.010,
'IO::Compress::Gzip' => 2,
'IO::Uncompress::Gunzip' => 2,
- 'PerlIO::Util' => 0
},
build_requires => {
'Module::Build' => 0,
diff --git a/META.yml b/META.yml
index 7a396b4..60ed43e 100644
--- a/META.yml
+++ b/META.yml
@@ -9,7 +9,6 @@ resources:
requires:
IO::Compress::Gzip: 2
IO::Uncompress::Gunzip: 2
- PerlIO::Util: 0
perl: 5.01
build_requires:
Module::Build: 0
diff --git a/lib/PerlIO/via/gzip.pm b/lib/PerlIO/via/gzip.pm
index 20e1b58..10de3e5 100755
--- a/lib/PerlIO/via/gzip.pm
+++ b/lib/PerlIO/via/gzip.pm
@@ -3,9 +3,9 @@
package PerlIO::via::gzip;
use strict;
use warnings;
-use PerlIO::Util;
use IO::Compress::Gzip qw(:constants);
use IO::Uncompress::Gunzip;
+use PerlIO;
use Carp;
our $VERSION = '0.021';
our $COMPRESSION_LEVEL = Z_DEFAULT_COMPRESSION;
@@ -30,7 +30,7 @@ sub PUSHED {
sub FILENO {
my ($self, $fh) = @_;
if ( !defined $self->{inited} ) {
- my $via = grep (/via/, $fh->get_layers);
+ my $via = grep (/via/, PerlIO::get_layers($fh));
my $compress = ($self->{mode} =~ /w|a/ and !$via) ||
($self->{mode} =~ /r/ and $via);
$self->{fileno} = fileno($fh); # nec. to kick fileno hooks