summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Control
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2010-02-20 23:50:06 +0100
committerRaphaël Hertzog <hertzog@debian.org>2010-02-21 00:08:01 +0100
commit5d1795408484778f7978062bb472c97b45a5cd10 (patch)
tree8bf7aaef3ab300ace8698fe7f96ecadd36c3dfcb /scripts/Dpkg/Control
parent513baa2c1e20036528fd8fb986ef407d4aa8d415 (diff)
downloaddpkg-5d1795408484778f7978062bb472c97b45a5cd10.tar.gz
Dpkg::Interface::Storable: load() and save() accept "-" for standard input/output
Simplify code in Dpkg::Control::Info thanks to this.
Diffstat (limited to 'scripts/Dpkg/Control')
-rw-r--r--scripts/Dpkg/Control/Info.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/scripts/Dpkg/Control/Info.pm b/scripts/Dpkg/Control/Info.pm
index 3f3ef2604..7ea87a08d 100644
--- a/scripts/Dpkg/Control/Info.pm
+++ b/scripts/Dpkg/Control/Info.pm
@@ -56,11 +56,7 @@ sub new {
};
bless $self, $class;
if ($arg) {
- if ($arg eq "-") {
- $self->parse(\*STDIN, _g("<standard input>"));
- } else {
- $self->load($arg);
- }
+ $self->load($arg);
} else {
$self->load("debian/control");
}
@@ -81,7 +77,8 @@ sub reset {
=item $c->load($file)
-Load the content of $file. Exits in case of errors.
+Load the content of $file. Exits in case of errors. If file is "-", it
+loads from the standard input.
=item $c->parse($fh, $description)