summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2013-04-24 13:32:29 +0200
committerGuillem Jover <guillem@debian.org>2013-04-27 04:13:29 +0200
commitcf51d05a229be66ca5a21b370faf7d376617098b (patch)
tree91210a6a11a75856d8f419c84c8a0c910b95563c /scripts
parenta62fb6adecfcb362e5f8927db33f32676668984a (diff)
downloaddpkg-cf51d05a229be66ca5a21b370faf7d376617098b.tar.gz
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Dpkg/Compression/FileHandle.pm4
1 files changed, 3 insertions, 1 deletions
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;
}