summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Control
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2018-10-23 02:58:56 +0200
committerGuillem Jover <guillem@debian.org>2019-01-15 03:42:38 +0100
commit853f59ec0468f72fa29811a8fe48fad91fab6083 (patch)
tree5b9db4aade1b54a79048994a98a62f65ceb4e983 /scripts/Dpkg/Control
parentdc87694fb736e004815350245a0f6503fb29081b (diff)
downloaddpkg-853f59ec0468f72fa29811a8fe48fad91fab6083.tar.gz
perl: Fix POD for Dpkg::Interface::Storable derived method implementations
Document inherited methods. Document the return values. Note which arguments are optional. Reorder methods by their position in the stack.
Diffstat (limited to 'scripts/Dpkg/Control')
-rw-r--r--scripts/Dpkg/Control/HashCore.pm19
-rw-r--r--scripts/Dpkg/Control/Info.pm15
2 files changed, 17 insertions, 17 deletions
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm
index e83522729..542069332 100644
--- a/scripts/Dpkg/Control/HashCore.pm
+++ b/scripts/Dpkg/Control/HashCore.pm
@@ -160,11 +160,6 @@ sub get_option {
return $$self->{$k};
}
-=item $c->load($file)
-
-Parse the content of $file. Exits in case of errors. Returns true if some
-fields have been parsed.
-
=item $c->parse_error($file, $fmt, ...)
Prints an error message and dies on syntax parse errors.
@@ -284,6 +279,11 @@ sub parse {
return defined($cf);
}
+=item $c->load($file)
+
+Parse the content of $file. Exits in case of errors. Returns true if some
+fields have been parsed.
+
=item $c->find_custom_field($name)
Scan the fields and look for a user specific field whose name matches the
@@ -313,11 +313,6 @@ sub get_custom_field {
return;
}
-=item $c->save($filename)
-
-Write the string representation of the control information to a
-file.
-
=item $str = $c->output()
=item "$c"
@@ -386,6 +381,10 @@ sub output {
return $str;
}
+=item $c->save($filename)
+
+Write the string representation of the control information to a file.
+
=item $c->set_output_order(@fields)
Define the order in which fields will be displayed in the output() method.
diff --git a/scripts/Dpkg/Control/Info.pm b/scripts/Dpkg/Control/Info.pm
index a5eae8732..9b07eedbe 100644
--- a/scripts/Dpkg/Control/Info.pm
+++ b/scripts/Dpkg/Control/Info.pm
@@ -90,11 +90,6 @@ sub reset {
$self->{packages} = [];
}
-=item $c->load($file)
-
-Load the content of $file. Exits in case of errors. If file is "-", it
-loads from the standard input.
-
=item $c->parse($fh, $description)
Parse a control file from the given filehandle. Exits in case of errors.
@@ -129,6 +124,11 @@ sub parse {
}
}
+=item $c->load($file)
+
+Load the content of $file. Exits in case of errors. If file is "-", it
+loads from the standard input.
+
=item $c->[0]
=item $c->get_source()
@@ -182,9 +182,10 @@ sub get_packages {
return @{$self->{packages}};
}
-=item $c->output($filehandle)
+=item $str = $c->output([$fh])
-Dump the content into a filehandle.
+Return the content info into a string. If $fh is specified print it into
+the filehandle.
=cut