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

changelog-debian: Always use Dpkg::Changelog::Debian->load()

The Storable::Interface supports opening standard input transparently
whenever '-' is passed as a filename.
Guillem Jover лет назад: 14
Родитель
Сommit
b736fc0984
1 измененных файлов с 2 добавлено и 7 удалено
  1. 2 7
      scripts/changelog/debian.pl

+ 2 - 7
scripts/changelog/debian.pl

@@ -136,13 +136,8 @@ my $range = {
 
 my $changes = Dpkg::Changelog::Debian->new(reportfile => $label, range => $range);
 
-if ($file eq '-') {
-    $changes->parse(\*STDIN, _g('<standard input>'))
-	or error(_g('fatal error occurred while parsing input'));
-} else {
-    $changes->load($file)
-	or error(_g('fatal error occurred while parsing %s'), $file);
-}
+$changes->load($file)
+    or error(_g('fatal error occurred while parsing %s'), $file);
 
 eval qq{
     my \$output = \$changes->$format(\$range);