From cf51d05a229be66ca5a21b370faf7d376617098b Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 24 Apr 2013 13:32:29 +0200 Subject: Dpkg::Compression::FileHandle: Handle new EOF method paramater Do not forward the integer parameter passed to the EOF method since perl 5.12, as the IO::Handle::eof function rejects it. This problem has been latent because for example Dpkg::Source::Patch was importing the whole POSIX module, including the EOF constant, which shadowed the EOF method. --- scripts/Dpkg/Compression/FileHandle.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/Dpkg/Compression') diff --git a/scripts/Dpkg/Compression/FileHandle.pm b/scripts/Dpkg/Compression/FileHandle.pm index e7c9082c1..4718a8ff5 100644 --- a/scripts/Dpkg/Compression/FileHandle.pm +++ b/scripts/Dpkg/Compression/FileHandle.pm @@ -232,7 +232,9 @@ sub FILENO { } sub EOF { - my ($self) = shift; + # Since perl 5.12, an integer parameter is passed describing how the + # function got called, just ignore it. + my ($self, $param) = (shift, shift); return *$self->{"file"}->eof(@_) if defined *$self->{"file"}; return 1; } -- cgit v1.2.3