diff options
author | Guillem Jover <guillem@debian.org> | 2012-12-30 01:35:10 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2013-04-28 00:18:01 +0200 |
commit | fc4f53c4b7d0837bef169ce7cdc0abec124f2d7d (patch) | |
tree | fbf0010e0818db47250a8a04dcaa4fc8bace5f48 /scripts/dpkg-genchanges.pl | |
parent | 9b590b2a54670c919a638a336769ae0687b2e72b (diff) | |
download | dpkg-fc4f53c4b7d0837bef169ce7cdc0abec124f2d7d.tar.gz |
Use proper variables instead of barewords for filehandles
Fixes InputOutput::ProhibitBarewordFileHandles.
Warned-by: perlcritic
Diffstat (limited to 'scripts/dpkg-genchanges.pl')
-rwxr-xr-x | scripts/dpkg-genchanges.pl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index 8a4839522..e61c8c863 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -227,8 +227,9 @@ if (defined($prev_changelog) and } if (not is_sourceonly) { - open(FL, "<", $fileslistfile) || syserr(_g("cannot read files list file")); - while(<FL>) { + open(my $fileslist_fh, "<", $fileslistfile) || + syserr(_g("cannot read files list file")); + while(<$fileslist_fh>) { if (m/^(([-+.0-9a-z]+)_([^_]+)_([-\w]+)\.u?deb) (\S+) (\S+)$/) { defined($p2f{"$2 $4"}) && warning(_g("duplicate files list entry for package %s (line %d)"), @@ -262,7 +263,7 @@ if (not is_sourceonly) { error(_g("badly formed line in files list file, line %d"), $.); } } - close(FL); + close($fileslist_fh); } # Scan control info of source package @@ -344,9 +345,10 @@ foreach $_ (keys %{$changelog}) { } if ($changesdescription) { - open(X, "<", $changesdescription) || syserr(_g("read changesdescription")); - $fields->{'Changes'} = "\n" . join("", <X>); - close(X); + open(my $changes_fh, "<", $changesdescription) || + syserr(_g("read changesdescription")); + $fields->{'Changes'} = "\n" . join("", <$changes_fh>); + close($changes_fh); } for my $pa (keys %pa2f) { |