Преглед изворни кода

Fix POD errors detected by podchecker in perl modules

Add missing blank lines after =cut, close =over section with =back and
add a FIXME comment to an empty section.
Guillem Jover пре 17 година
родитељ
комит
4a0c791714

+ 2 - 0
scripts/Dpkg/Cdata.pm

@@ -52,6 +52,7 @@ The return value is a reference to a tied hash (Dpkg::Fields::Object) that
 can be used to access the various fields.
 can be used to access the various fields.
 
 
 =cut
 =cut
+
 sub parsecdata {
 sub parsecdata {
     my ($input, $file, %options) = @_;
     my ($input, $file, %options) = @_;
 
 
@@ -121,4 +122,5 @@ sub parsecdata {
 =back
 =back
 
 
 =cut
 =cut
+
 1;
 1;

+ 4 - 1
scripts/Dpkg/Changelog.pm

@@ -24,7 +24,7 @@ Dpkg::Changelog
 
 
 =head1 DESCRIPTION
 =head1 DESCRIPTION
 
 
-to be written
+FIXME: to be written
 
 
 =head2 Functions
 =head2 Functions
 
 
@@ -722,6 +722,7 @@ as "--<key>". If the value of the corresponding hash entry is defined, then
 it's passed as the parameter that follows.
 it's passed as the parameter that follows.
 
 
 =cut
 =cut
+
 sub parse_changelog {
 sub parse_changelog {
     my (%options) = @_;
     my (%options) = @_;
     my @parserpath = ("/usr/local/lib/dpkg/parsechangelog",
     my @parserpath = ("/usr/local/lib/dpkg/parsechangelog",
@@ -821,6 +822,8 @@ Dpkg::Changelog::Entry - represents one entry in a Debian changelog
 
 
 =head1 SYNOPSIS
 =head1 SYNOPSIS
 
 
+FIXME: to be written
+
 =head1 DESCRIPTION
 =head1 DESCRIPTION
 
 
 =cut
 =cut

+ 9 - 0
scripts/Dpkg/Control.pm

@@ -42,6 +42,7 @@ Create a new Dpkg::Control object for $file. If $file is omitted, it parses
 debian/control. If file is "-", it parses the standard input.
 debian/control. If file is "-", it parses the standard input.
 
 
 =cut
 =cut
+
 sub new {
 sub new {
     my ($this, $arg) = @_;
     my ($this, $arg) = @_;
     my $class = ref($this) || $this;
     my $class = ref($this) || $this;
@@ -67,6 +68,7 @@ sub new {
 Resets what got read.
 Resets what got read.
 
 
 =cut
 =cut
+
 sub reset {
 sub reset {
     my $self = shift;
     my $self = shift;
     $self->{source} = undef;
     $self->{source} = undef;
@@ -78,6 +80,7 @@ sub reset {
 Parse the content of $file. Exits in case of errors.
 Parse the content of $file. Exits in case of errors.
 
 
 =cut
 =cut
+
 sub parse {
 sub parse {
     my ($self, $file) = @_;
     my ($self, $file) = @_;
     open(CDATA, "<", $file) || syserr(_g("cannot read %s"), $file);
     open(CDATA, "<", $file) || syserr(_g("cannot read %s"), $file);
@@ -93,6 +96,7 @@ or a description of where the data comes from. It's used in error
 messages.
 messages.
 
 
 =cut
 =cut
+
 sub parse_fh {
 sub parse_fh {
     my ($self, $fh, $desc) = @_;
     my ($self, $fh, $desc) = @_;
     $self->reset();
     $self->reset();
@@ -118,6 +122,7 @@ Returns a reference to a hash containing the fields concerning the
 source package. The hash is tied to Dpkg::Fields::Object.
 source package. The hash is tied to Dpkg::Fields::Object.
 
 
 =cut
 =cut
+
 sub get_source {
 sub get_source {
     my $self = shift;
     my $self = shift;
     return $self->{source};
     return $self->{source};
@@ -130,6 +135,7 @@ package numbered $idx (starting at 1). The hash is tied to
 Dpkg::Fields::Object.
 Dpkg::Fields::Object.
 
 
 =cut
 =cut
+
 sub get_pkg_by_idx {
 sub get_pkg_by_idx {
     my ($self, $idx) = @_;
     my ($self, $idx) = @_;
     return $self->{packages}[--$idx];
     return $self->{packages}[--$idx];
@@ -141,6 +147,7 @@ Returns a reference to a hash containing the fields concerning the binary
 package named $name. The hash is tied to Dpkg::Fields::Object.
 package named $name. The hash is tied to Dpkg::Fields::Object.
 
 
 =cut
 =cut
+
 sub get_pkg_by_name {
 sub get_pkg_by_name {
     my ($self, $name) = @_;
     my ($self, $name) = @_;
     foreach my $pkg (@{$self->{packages}}) {
     foreach my $pkg (@{$self->{packages}}) {
@@ -155,6 +162,7 @@ sub get_pkg_by_name {
 Returns a list containing the hashes for all binary packages.
 Returns a list containing the hashes for all binary packages.
 
 
 =cut
 =cut
+
 sub get_packages {
 sub get_packages {
     my $self = shift;
     my $self = shift;
     return @{$self->{packages}};
     return @{$self->{packages}};
@@ -165,6 +173,7 @@ sub get_packages {
 Dump the content into a filehandle.
 Dump the content into a filehandle.
 
 
 =cut
 =cut
+
 sub dump {
 sub dump {
     my ($self, $fh) = @_;
     my ($self, $fh) = @_;
     tied(%{$self->{source}})->dump($fh);
     tied(%{$self->{source}})->dump($fh);

+ 9 - 0
scripts/Dpkg/Deps.pm

@@ -116,6 +116,7 @@ The arguments can also be undef in case there's no explicit architecture
 restriction.
 restriction.
 
 
 =cut
 =cut
+
 sub arch_is_superset {
 sub arch_is_superset {
     my ($p, $q) = @_;
     my ($p, $q) = @_;
     my $p_arch_neg = defined($p) && $p->[0] =~ /^!/;
     my $p_arch_neg = defined($p) && $p->[0] =~ /^!/;
@@ -186,6 +187,7 @@ dependency. It returns 0 if the "p" dependency implies that "q" is
 not satisfied. It returns undef when there's no implication.
 not satisfied. It returns undef when there's no implication.
 
 
 =cut
 =cut
+
 sub version_implies {
 sub version_implies {
     my ($rel_p, $v_p, $rel_q, $v_q) = @_;
     my ($rel_p, $v_p, $rel_q, $v_q) = @_;
 
 
@@ -296,6 +298,7 @@ this when parsing non-dependency fields like Conflicts (see
 =back
 =back
 
 
 =cut
 =cut
+
 sub parse {
 sub parse {
     my $dep_line = shift;
     my $dep_line = shift;
     my %options = (@_);
     my %options = (@_);
@@ -357,6 +360,7 @@ dumping.
 =back
 =back
 
 
 =cut
 =cut
+
 sub compare {
 sub compare {
     my ($a, $b) = @_;
     my ($a, $b) = @_;
     return -1 if $a->is_empty();
     return -1 if $a->is_empty();
@@ -785,6 +789,7 @@ Add a new dependency object at the end of the list.
 =back
 =back
 
 
 =cut
 =cut
+
 use strict;
 use strict;
 use warnings;
 use warnings;
 
 
@@ -1113,6 +1118,7 @@ packages provided (by the set of installed packages).
 Create a new object.
 Create a new object.
 
 
 =cut
 =cut
+
 use strict;
 use strict;
 use warnings;
 use warnings;
 
 
@@ -1131,6 +1137,7 @@ undefined we know that the package is installed but we don't know which
 version it is.
 version it is.
 
 
 =cut
 =cut
+
 sub add_installed_package {
 sub add_installed_package {
     my ($self, $pkg, $ver) = @_;
     my ($self, $pkg, $ver) = @_;
     $self->{pkg}{$pkg} = $ver;
     $self->{pkg}{$pkg} = $ver;
@@ -1143,6 +1150,7 @@ and $version correspond to the associated relation given in the Provides
 field. This might be used in the future for versioned provides.
 field. This might be used in the future for versioned provides.
 
 
 =cut
 =cut
+
 sub add_provided_package {
 sub add_provided_package {
     my ($self, $pkg, $rel, $ver, $by) = @_;
     my ($self, $pkg, $rel, $ver, $by) = @_;
     if (not exists $self->{virtualpkg}{$pkg}) {
     if (not exists $self->{virtualpkg}{$pkg}) {
@@ -1161,6 +1169,7 @@ listed as [ $provider, $relation, $version ]).
 =back
 =back
 
 
 =cut
 =cut
+
 sub check_package {
 sub check_package {
     my ($self, $pkg) = @_;
     my ($self, $pkg) = @_;
     if (exists $self->{pkg}{$pkg}) {
     if (exists $self->{pkg}{$pkg}) {

+ 7 - 0
scripts/Dpkg/Fields.pm

@@ -46,6 +46,7 @@ Dpkg::Fields::capit). It also stores the order in which fields have been
 added in order to be able to dump them in the same order.
 added in order to be able to dump them in the same order.
 
 
 =cut
 =cut
+
 use Tie::Hash;
 use Tie::Hash;
 our @ISA = qw(Tie::ExtraHash Tie::Hash);
 our @ISA = qw(Tie::ExtraHash Tie::Hash);
 
 
@@ -66,6 +67,7 @@ Return a reference to a tied hash implementing storage of simple
 "field: value" mapping as used in many Debian-specific files.
 "field: value" mapping as used in many Debian-specific files.
 
 
 =cut
 =cut
+
 sub new {
 sub new {
     my $hash = {};
     my $hash = {};
     tie %{$hash}, 'Dpkg::Fields::Object';
     tie %{$hash}, 'Dpkg::Fields::Object';
@@ -138,6 +140,7 @@ following regex: /X[SBC]+-$name/i. Return the name of the field found or
 undef if nothing has been found.
 undef if nothing has been found.
 
 
 =cut
 =cut
+
 sub find_custom_field {
 sub find_custom_field {
     my ($self, $name) = @_;
     my ($self, $name) = @_;
     foreach my $key (keys %{$self->[0]}) {
     foreach my $key (keys %{$self->[0]}) {
@@ -151,6 +154,7 @@ sub find_custom_field {
 Identify a user field and retrieve its value.
 Identify a user field and retrieve its value.
 
 
 =cut
 =cut
+
 sub get_custom_field {
 sub get_custom_field {
     my ($self, $name) = @_;
     my ($self, $name) = @_;
     my $key = $self->find_custom_field($name);
     my $key = $self->find_custom_field($name);
@@ -164,6 +168,7 @@ sub get_custom_field {
 Dump the raw content of the hash either as a string or to a filehandle.
 Dump the raw content of the hash either as a string or to a filehandle.
 
 
 =cut
 =cut
+
 sub dump {
 sub dump {
     my ($self, $fh) = @_;
     my ($self, $fh) = @_;
     my $str = "";
     my $str = "";
@@ -181,6 +186,7 @@ sub dump {
 Define the order in which fields will be displayed in the output() method.
 Define the order in which fields will be displayed in the output() method.
 
 
 =cut
 =cut
+
 sub set_field_importance {
 sub set_field_importance {
     my ($self, @fields) = @_;
     my ($self, @fields) = @_;
     my $i = 1;
     my $i = 1;
@@ -197,6 +203,7 @@ substitution of variables defined in the Dpkg::Substvars object.
 Also returns the string of what would printed on the filehandle.
 Also returns the string of what would printed on the filehandle.
 
 
 =cut
 =cut
+
 sub output {
 sub output {
     my ($self, $fh, $substvars) = @_;
     my ($self, $fh, $substvars) = @_;
     my $str = "";
     my $str = "";

+ 4 - 0
scripts/Dpkg/Path.pm

@@ -88,6 +88,7 @@ It can still return undef if a file outside of the debian sub-directory is
 provided.
 provided.
 
 
 =cut
 =cut
+
 sub guess_pkg_root_dir($) {
 sub guess_pkg_root_dir($) {
     my $file = shift;
     my $file = shift;
     my $root = get_pkg_root_dir($file);
     my $root = get_pkg_root_dir($file);
@@ -113,6 +114,7 @@ numbers and the inode numbers returned by stat()/lstat() are the same. If
 $resolve_symlink is true then stat() is used, otherwise lstat() is used.
 $resolve_symlink is true then stat() is used, otherwise lstat() is used.
 
 
 =cut
 =cut
+
 sub check_files_are_the_same($$;$) {
 sub check_files_are_the_same($$;$) {
     my ($file1, $file2, $resolve_symlink) = @_;
     my ($file1, $file2, $resolve_symlink) = @_;
     return 0 if ((! -e $file1) || (! -e $file2));
     return 0 if ((! -e $file1) || (! -e $file2));
@@ -137,6 +139,7 @@ previous element is not a symlink. Thus it should only be used on real
 filenames.
 filenames.
 
 
 =cut
 =cut
+
 sub canonpath($) {
 sub canonpath($) {
     my $path = shift;
     my $path = shift;
     $path = File::Spec->canonpath($path);
     $path = File::Spec->canonpath($path);
@@ -170,6 +173,7 @@ Return the filename of the file pointed by the symlink. The new name is
 canonicalized by canonpath().
 canonicalized by canonpath().
 
 
 =cut
 =cut
+
 sub resolve_symlink($) {
 sub resolve_symlink($) {
     my $symlink = shift;
     my $symlink = shift;
     my $content = readlink($symlink);
     my $content = readlink($symlink);

+ 7 - 0
scripts/Dpkg/Substvars.pm

@@ -51,6 +51,7 @@ and ${dpkg:Upstream-Version}.
 Additional substitutions will be read from the $file passed as parameter.
 Additional substitutions will be read from the $file passed as parameter.
 
 
 =cut
 =cut
+
 sub new {
 sub new {
     my ($this, $arg) = @_;
     my ($this, $arg) = @_;
     my $class = ref($this) || $this;
     my $class = ref($this) || $this;
@@ -74,6 +75,7 @@ sub new {
 Add/replace a substitution.
 Add/replace a substitution.
 
 
 =cut
 =cut
+
 sub set {
 sub set {
     my ($self, $key, $value) = @_;
     my ($self, $key, $value) = @_;
     $self->{$key} = $value;
     $self->{$key} = $value;
@@ -84,6 +86,7 @@ sub set {
 Get the value of a given substitution.
 Get the value of a given substitution.
 
 
 =cut
 =cut
+
 sub get {
 sub get {
     my ($self, $key) = @_;
     my ($self, $key) = @_;
     return $self->{$key};
     return $self->{$key};
@@ -94,6 +97,7 @@ sub get {
 Remove a given substitution.
 Remove a given substitution.
 
 
 =cut
 =cut
+
 sub delete {
 sub delete {
     my ($self, $key) = @_;
     my ($self, $key) = @_;
     return delete $self->{$key};
     return delete $self->{$key};
@@ -104,6 +108,7 @@ sub delete {
 Add new substitutions read from $file.
 Add new substitutions read from $file.
 
 
 =cut
 =cut
+
 sub parse {
 sub parse {
     my ($self, $varlistfile) = @_;
     my ($self, $varlistfile) = @_;
     $varlistfile="./$varlistfile" if $varlistfile =~ m/\s/;
     $varlistfile="./$varlistfile" if $varlistfile =~ m/\s/;
@@ -129,6 +134,7 @@ Defines ${binary:Version}, ${source:Version} and
 ${source:Upstream-Version} based on the given version string.
 ${source:Upstream-Version} based on the given version string.
 
 
 =cut
 =cut
+
 sub set_version_substvars {
 sub set_version_substvars {
     my ($self, $version) = @_;
     my ($self, $version) = @_;
 
 
@@ -159,6 +165,7 @@ sub set_arch_substvars {
 Substitutes variables in $string and return the result in $newstring.
 Substitutes variables in $string and return the result in $newstring.
 
 
 =cut
 =cut
+
 sub substvars {
 sub substvars {
     my ($self, $v) = @_;
     my ($self, $v) = @_;
     my $lhs;
     my $lhs;

+ 9 - 0
scripts/Dpkg/Vendor.pm

@@ -57,6 +57,7 @@ to the vendor of the currently installed operating system. Returns undef
 if there's no file for the given vendor.
 if there's no file for the given vendor.
 
 
 =cut
 =cut
+
 sub get_vendor_info(;$) {
 sub get_vendor_info(;$) {
     my $vendor = shift || "default";
     my $vendor = shift || "default";
     my $file = get_vendor_file($vendor);
     my $file = get_vendor_file($vendor);
@@ -73,6 +74,7 @@ Check if there's a file for the given vendor and returns its
 name.
 name.
 
 
 =cut
 =cut
+
 sub get_vendor_file(;$) {
 sub get_vendor_file(;$) {
     my $vendor = shift || "default";
     my $vendor = shift || "default";
     my $file;
     my $file;
@@ -89,6 +91,7 @@ that first, otherwise it falls back to parsing /etc/dpkg/origins/default.
 If that file doesn't exist, it returns undef.
 If that file doesn't exist, it returns undef.
 
 
 =cut
 =cut
+
 sub get_current_vendor() {
 sub get_current_vendor() {
     my $f;
     my $f;
     if ($ENV{'DEB_VENDOR'}) {
     if ($ENV{'DEB_VENDOR'}) {
@@ -108,6 +111,7 @@ If no vendor can be identified, then return the Dpkg::Vendor::Default
 object.
 object.
 
 
 =cut
 =cut
+
 my %OBJECT_CACHE;
 my %OBJECT_CACHE;
 sub get_vendor_object {
 sub get_vendor_object {
     my $vendor = shift || get_current_vendor() || "Default";
     my $vendor = shift || get_current_vendor() || "Default";
@@ -133,9 +137,14 @@ sub get_vendor_object {
 Run a hook implemented by the current vendor object.
 Run a hook implemented by the current vendor object.
 
 
 =cut
 =cut
+
 sub run_vendor_hook {
 sub run_vendor_hook {
     my $vendor_obj = get_vendor_object();
     my $vendor_obj = get_vendor_object();
     $vendor_obj->run_hook(@_);
     $vendor_obj->run_hook(@_);
 }
 }
 
 
+=back
+
+=cut
+
 1;
 1;

+ 3 - 0
scripts/Dpkg/Vendor/Default.pm

@@ -52,6 +52,7 @@ Creates the default vendor object. Can be inherited by all vendor objects
 if they don't need any specific initialization at object creation time.
 if they don't need any specific initialization at object creation time.
 
 
 =cut
 =cut
+
 sub new {
 sub new {
     my ($this) = @_;
     my ($this) = @_;
     my $class = ref($this) || $this;
     my $class = ref($this) || $this;
@@ -87,6 +88,7 @@ vendor-specific keyrings.
 =back
 =back
 
 
 =cut
 =cut
+
 sub run_hook {
 sub run_hook {
     my ($self, $hook, @params) = @_;
     my ($self, $hook, @params) = @_;
 
 
@@ -102,4 +104,5 @@ sub run_hook {
 =back
 =back
 
 
 =cut
 =cut
+
 1;
 1;

+ 3 - 0
scripts/Dpkg/Vendor/Ubuntu.pm

@@ -36,6 +36,7 @@ This vendor object customize the behaviour of dpkg-source
 to check that Maintainers have been modified if necessary.
 to check that Maintainers have been modified if necessary.
 
 
 =cut
 =cut
+
 sub run_hook {
 sub run_hook {
     my ($self, $hook, @params) = @_;
     my ($self, $hook, @params) = @_;
 
 
@@ -87,6 +88,7 @@ which are references to bugs on Launchpad. Returns all closed bug
 numbers in an array reference.
 numbers in an array reference.
 
 
 =cut
 =cut
+
 sub find_launchpad_closes {
 sub find_launchpad_closes {
     my ($changes) = @_;
     my ($changes) = @_;
     my @closes = ();
     my @closes = ();
@@ -104,4 +106,5 @@ sub find_launchpad_closes {
 =back
 =back
 
 
 =cut
 =cut
+
 1;
 1;

+ 1 - 0
scripts/Dpkg/Version.pm

@@ -202,6 +202,7 @@ an error message if it contains illegal characters, otherwise it returns
 true.
 true.
 
 
 =cut
 =cut
+
 sub check_version ($;$) {
 sub check_version ($;$) {
     my ($version, $die) = @_;
     my ($version, $die) = @_;
     $version ||= "";
     $version ||= "";