Просмотр исходного кода

dpkg-scanpackages: Use a scalar variable instead of an IO::Handle

Guillem Jover лет назад: 11
Родитель
Сommit
f2dad32eb5
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      scripts/dpkg-scanpackages.pl

+ 1 - 3
scripts/dpkg-scanpackages.pl

@@ -20,7 +20,6 @@
 use warnings;
 use warnings;
 use strict;
 use strict;
 
 
-use IO::Handle;
 use Getopt::Long qw(:config posix_default bundling no_ignorecase);
 use Getopt::Long qw(:config posix_default bundling no_ignorecase);
 
 
 use Dpkg ();
 use Dpkg ();
@@ -253,8 +252,7 @@ if (defined $override and not -e $override) {
 
 
 $pathprefix //= '';
 $pathprefix //= '';
 
 
-my $find_h = IO::Handle->new();
-open($find_h, '-|', 'find', '-L', "$binarydir/", @find_args, '-print')
+open my $find_h, '-|', 'find', '-L', "$binarydir/", @find_args, '-print'
      or syserr(g_("couldn't open %s for reading"), $binarydir);
      or syserr(g_("couldn't open %s for reading"), $binarydir);
 while (my $fn = <$find_h>) {
 while (my $fn = <$find_h>) {
     chomp $fn;
     chomp $fn;