diff options
author | Guillem Jover <guillem@debian.org> | 2016-08-15 23:12:43 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2016-10-30 04:43:34 +0100 |
commit | 29df37ac73cc130e53bfc4278db9ea912d488ca9 (patch) | |
tree | 3624a994af12d481b0140e1fd8f7fc795f0d40f6 /scripts/Dpkg/Control | |
parent | 26e44471eb8d53b7a468d5cf3eeb72a875246d8b (diff) | |
download | dpkg-29df37ac73cc130e53bfc4278db9ea912d488ca9.tar.gz |
Dpkg: Document the behavior for consecutive calls to parse() methods
Prompted-by: Johannes Schauer <josch@debian.org>
Diffstat (limited to 'scripts/Dpkg/Control')
-rw-r--r-- | scripts/Dpkg/Control/HashCore.pm | 4 | ||||
-rw-r--r-- | scripts/Dpkg/Control/Info.pm | 4 | ||||
-rw-r--r-- | scripts/Dpkg/Control/Tests/Entry.pm | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm index 06006981f..46e3dfddd 100644 --- a/scripts/Dpkg/Control/HashCore.pm +++ b/scripts/Dpkg/Control/HashCore.pm @@ -183,7 +183,9 @@ sub parse_error { Parse a control file from the given filehandle. Exits in case of errors. $description is used to describe the filehandle, ideally it's a filename or a description of where the data comes from. It's used in error -messages. Returns true if some fields have been parsed. +messages. When called multiple times, the parsed fields are accumulated. + +Returns true if some fields have been parsed. =cut diff --git a/scripts/Dpkg/Control/Info.pm b/scripts/Dpkg/Control/Info.pm index 5961c9915..a5eae8732 100644 --- a/scripts/Dpkg/Control/Info.pm +++ b/scripts/Dpkg/Control/Info.pm @@ -99,8 +99,8 @@ loads from the standard input. Parse a control file from the given filehandle. Exits in case of errors. $description is used to describe the filehandle, ideally it's a filename -or a description of where the data comes from. It's used in error -messages. +or a description of where the data comes from. It is used in error messages. +The data in the object is reset before parsing new control files. =cut diff --git a/scripts/Dpkg/Control/Tests/Entry.pm b/scripts/Dpkg/Control/Tests/Entry.pm index 392493c2a..92eea49f4 100644 --- a/scripts/Dpkg/Control/Tests/Entry.pm +++ b/scripts/Dpkg/Control/Tests/Entry.pm @@ -61,7 +61,10 @@ sub new { =item $entry->parse($fh, $desc) -Parse a control test entry from a filehandle. +Parse a control test entry from a filehandle. When called multiple times, +the parsed fields are accumulated. + +Returns true if parsing was a success. =cut |