Quellcode durchsuchen

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.
Guillem Jover vor 13 Jahren
Ursprung
Commit
cf51d05a22
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 3 1
      scripts/Dpkg/Compression/FileHandle.pm

+ 3 - 1
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;
 }