[dpkg] 105/187: Dpkg::Compression::FileHandle: Inherit from IO::File instead of FileHandle
Reiner Herrmann
reiner at reiner-h.de
Sun Nov 6 12:46:30 UTC 2016
This is an automated email from the git hooks/post-receive script.
deki-guest pushed a commit to branch master
in repository dpkg.
commit 739bb238937e2999feb6b853e5594d89fc981a56
Author: Guillem Jover <guillem at debian.org>
Date: Sat Oct 1 17:59:06 2016 +0200
Dpkg::Compression::FileHandle: Inherit from IO::File instead of FileHandle
Avoid the indirection, and use the more current module.
---
debian/changelog | 2 ++
scripts/Dpkg/Compression/FileHandle.pm | 6 +++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 025b4ba..bceb093 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -62,6 +62,8 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
Closes: #839905, #840293
- Always map the build type to the shortest string form in
Dpkg::Build::Type::get_build_options_from_type().
+ - Change Dpkg::Compression::FileHandle to inherit directly from IO::File
+ instead of FileHandle.
* Packaging:
- Add liblocale-gettext-perl to libdpkg-perl Recommends.
- Wrap and document dependency relationships.
diff --git a/scripts/Dpkg/Compression/FileHandle.pm b/scripts/Dpkg/Compression/FileHandle.pm
index 9ce717c..dd9ae69 100644
--- a/scripts/Dpkg/Compression/FileHandle.pm
+++ b/scripts/Dpkg/Compression/FileHandle.pm
@@ -29,7 +29,7 @@ use Dpkg::Compression::Process;
use Dpkg::Gettext;
use Dpkg::ErrorHandling;
-use parent qw(FileHandle Tie::Handle);
+use parent qw(IO::File Tie::Handle);
# Useful reference to understand some kludges required to
# have the object behave like a filehandle
@@ -103,7 +103,7 @@ and you can't seek on a pipe.
=head1 FileHandle METHODS
-The object inherits from FileHandle so all methods that work on this
+The object inherits from IO::File so all methods that work on this
object should work for Dpkg::Compression::FileHandle too. There
may be exceptions though.
@@ -126,7 +126,7 @@ obviously incompatible with automatic detection of the compression method.
sub new {
my ($this, %args) = @_;
my $class = ref($this) || $this;
- my $self = FileHandle->new();
+ my $self = IO::File->new();
# Tying is required to overload the open functions and to auto-open
# the file on first read/write operation
tie *$self, $class, $self;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list