[Reproducible-commits] [dpkg] 61/74: Dpkg::Compression::FileHandle: Fix example code in SYNOPSIS

Mattia Rizzolo mattia at debian.org
Sun Jul 3 22:22:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to annotated tag 1.18.8
in repository dpkg.

commit 96ffab9abd1eba496dc4fc8a679977f4339c0c9c
Author: Guillem Jover <guillem at debian.org>
Date:   Thu Jun 16 20:21:47 2016 +0200

    Dpkg::Compression::FileHandle: Fix example code in SYNOPSIS
    
    Make it compile.
---
 debian/changelog                       | 1 +
 scripts/Dpkg/Compression/FileHandle.pm | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5dd290d..5c2cb03 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -96,6 +96,7 @@ dpkg (1.18.8) UNRELEASED; urgency=medium
       and their format being inconsistent. In addition most got already
       removed in the past for the man pages.
     - Mark perlcritic as an optional author test dependency in the README.
+    - Fix example code in Dpkg::Compression::FileHandle SYNOPSIS.
 
   [ Updated programs translations ]
   * German (Sven Joachim).
diff --git a/scripts/Dpkg/Compression/FileHandle.pm b/scripts/Dpkg/Compression/FileHandle.pm
index 8ed3b3e..9d91b77 100644
--- a/scripts/Dpkg/Compression/FileHandle.pm
+++ b/scripts/Dpkg/Compression/FileHandle.pm
@@ -45,6 +45,8 @@ Dpkg::Compression::FileHandle - object dealing transparently with file compressi
 
     use Dpkg::Compression::FileHandle;
 
+    my ($fh, @lines);
+
     $fh = Dpkg::Compression::FileHandle->new(filename => 'sample.gz');
     print $fh "Something\n";
     close $fh;
@@ -60,17 +62,17 @@ Dpkg::Compression::FileHandle - object dealing transparently with file compressi
     $fh->close();
 
     $fh = Dpkg::Compression::FileHandle->new(filename => 'sample.gz');
-    my @lines = <$fh>;
+    @lines = <$fh>;
     close $fh;
 
     $fh = Dpkg::Compression::FileHandle->new();
     open($fh, '<', 'sample.bz2');
-    my @lines = <$fh>;
+    @lines = <$fh>;
     close $fh;
 
     $fh = Dpkg::Compression::FileHandle->new();
     $fh->open('sample.xz', 'r');
-    my @lines = $fh->getlines();
+    @lines = $fh->getlines();
     $fh->close();
 
 =head1 DESCRIPTION

-- 
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