This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=dbede18a5eba12dd61aec4e8cc9f701d98fb29f4

commit dbede18a5eba12dd61aec4e8cc9f701d98fb29f4
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Sat Mar 11 23:53:38 2023 +0100

    perl: Move POD sections before what they describe
    
    For NAME and DESCRIPTION we are describing the whole package, so do
    that before the keyword as we do as well when describing variables or
    functions.
    
    For FUNCTIONS and METHODS, move them immediately before the functions
    or methods they start describing.
---
 scripts/Dpkg.pm                        |  4 +-
 scripts/Dpkg/Arch.pm                   |  4 +-
 scripts/Dpkg/Build/Info.pm             | 28 +++++++------
 scripts/Dpkg/BuildEnv.pm               | 22 +++++-----
 scripts/Dpkg/BuildFlags.pm             | 24 ++++++-----
 scripts/Dpkg/BuildInfo.pm              | 24 ++++++-----
 scripts/Dpkg/BuildOptions.pm           | 24 ++++++-----
 scripts/Dpkg/BuildProfiles.pm          | 24 ++++++-----
 scripts/Dpkg/BuildTypes.pm             | 34 ++++++++--------
 scripts/Dpkg/Changelog/Entry.pm        | 26 ++++++------
 scripts/Dpkg/Changelog/Entry/Debian.pm | 30 +++++++-------
 scripts/Dpkg/Checksums.pm              | 26 ++++++------
 scripts/Dpkg/Compression.pm            | 26 ++++++------
 scripts/Dpkg/Compression/FileHandle.pm | 42 ++++++++++---------
 scripts/Dpkg/Compression/Process.pm    | 24 ++++++-----
 scripts/Dpkg/Conf.pm                   | 24 ++++++-----
 scripts/Dpkg/Control.pm                | 74 +++++++++++++++++-----------------
 scripts/Dpkg/Control/Changelog.pm      | 24 ++++++-----
 scripts/Dpkg/Control/Fields.pm         | 28 +++++++------
 scripts/Dpkg/Control/FieldsCore.pm     | 26 ++++++------
 scripts/Dpkg/Control/Hash.pm           | 24 ++++++-----
 scripts/Dpkg/Control/HashCore.pm       | 46 +++++++++++----------
 scripts/Dpkg/Control/Info.pm           | 24 ++++++-----
 scripts/Dpkg/Control/Tests.pm          | 24 ++++++-----
 scripts/Dpkg/Control/Tests/Entry.pm    | 22 +++++-----
 scripts/Dpkg/Control/Types.pm          | 36 ++++++++---------
 scripts/Dpkg/Deps.pm                   | 16 ++++----
 scripts/Dpkg/Deps/AND.pm               |  4 +-
 scripts/Dpkg/Deps/KnownFacts.pm        |  4 +-
 scripts/Dpkg/Deps/Multiple.pm          |  4 +-
 scripts/Dpkg/Deps/OR.pm                |  4 +-
 scripts/Dpkg/Deps/Simple.pm            | 12 +++---
 scripts/Dpkg/Deps/Union.pm             |  4 +-
 scripts/Dpkg/Exit.pm                   | 22 +++++-----
 scripts/Dpkg/Gettext.pm                | 26 ++++++------
 scripts/Dpkg/IPC.pm                    | 28 +++++++------
 scripts/Dpkg/Index.pm                  | 22 +++++-----
 scripts/Dpkg/Interface/Storable.pm     | 26 ++++++------
 scripts/Dpkg/Path.pm                   | 22 +++++-----
 scripts/Dpkg/Source/Format.pm          |  4 +-
 scripts/Dpkg/Source/Package.pm         |  4 +-
 scripts/Dpkg/Substvars.pm              | 24 +++++------
 scripts/Dpkg/Vendor.pm                 | 54 +++++++++++++------------
 scripts/Dpkg/Vendor/Debian.pm          | 28 ++++++-------
 scripts/Dpkg/Vendor/Default.pm         | 24 ++++++-----
 scripts/Dpkg/Vendor/Devuan.pm          | 18 ++++-----
 scripts/Dpkg/Vendor/Ubuntu.pm          | 30 +++++++-------
 scripts/Dpkg/Version.pm                | 30 +++++++-------
 48 files changed, 592 insertions(+), 532 deletions(-)

diff --git a/scripts/Dpkg.pm b/scripts/Dpkg.pm
index e84850665..a1b25bc7b 100644
--- a/scripts/Dpkg.pm
+++ b/scripts/Dpkg.pm
@@ -11,8 +11,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg;
-
 =encoding utf8
 
 =head1 NAME
@@ -28,6 +26,8 @@ It is also the entry point to the Dpkg module hierarchy.
 
 =cut
 
+package Dpkg;
+
 use strict;
 use warnings;
 
diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
index 3d8d09584..c9fa69866 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
@@ -13,8 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Arch;
-
 =encoding utf8
 
 =head1 NAME
@@ -32,6 +30,8 @@ to import specific symbol subsets.
 
 =cut
 
+package Dpkg::Arch;
+
 use strict;
 use warnings;
 use feature qw(state);
diff --git a/scripts/Dpkg/Build/Info.pm b/scripts/Dpkg/Build/Info.pm
index d789a362e..c43322731 100644
--- a/scripts/Dpkg/Build/Info.pm
+++ b/scripts/Dpkg/Build/Info.pm
@@ -13,6 +13,21 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Build::Info - handle build information
+
+=head1 DESCRIPTION
+
+The Dpkg::Build::Info module provides functions to handle the build
+information.
+
+This module is deprecated, use Dpkg::BuildInfo instead.
+
+=cut
+
 package Dpkg::Build::Info;
 
 use strict;
@@ -28,19 +43,6 @@ use Exporter qw(import);
 
 use Dpkg::BuildInfo;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Build::Info - handle build information
-
-=head1 DESCRIPTION
-
-The Dpkg::Build::Info module provides functions to handle the build
-information.
-
-This module is deprecated, use Dpkg::BuildInfo instead.
-
 =head1 FUNCTIONS
 
 =over 4
diff --git a/scripts/Dpkg/BuildEnv.pm b/scripts/Dpkg/BuildEnv.pm
index 2ab5707f8..bc9aefb4c 100644
--- a/scripts/Dpkg/BuildEnv.pm
+++ b/scripts/Dpkg/BuildEnv.pm
@@ -13,16 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::BuildEnv;
-
-use strict;
-use warnings;
-
-our $VERSION = '0.01';
-
-my %env_modified = ();
-my %env_accessed = ();
-
 =encoding utf8
 
 =head1 NAME
@@ -36,6 +26,18 @@ environment variables being used and modified.
 
 B<Note>: This is a private module, its API can change at any time.
 
+=cut
+
+package Dpkg::BuildEnv;
+
+use strict;
+use warnings;
+
+our $VERSION = '0.01';
+
+my %env_modified = ();
+my %env_accessed = ();
+
 =head1 FUNCTIONS
 
 =over 4
diff --git a/scripts/Dpkg/BuildFlags.pm b/scripts/Dpkg/BuildFlags.pm
index 5975bb07a..3495b2c76 100644
--- a/scripts/Dpkg/BuildFlags.pm
+++ b/scripts/Dpkg/BuildFlags.pm
@@ -14,6 +14,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::BuildFlags - query build flags
+
+=head1 DESCRIPTION
+
+This class is used by dpkg-buildflags and can be used
+to query the same information.
+
+=cut
+
 package Dpkg::BuildFlags;
 
 use strict;
@@ -27,17 +40,6 @@ use Dpkg::BuildEnv;
 use Dpkg::ErrorHandling;
 use Dpkg::Vendor qw(run_vendor_hook);
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::BuildFlags - query build flags
-
-=head1 DESCRIPTION
-
-This class is used by dpkg-buildflags and can be used
-to query the same information.
-
 =head1 METHODS
 
 =over 4
diff --git a/scripts/Dpkg/BuildInfo.pm b/scripts/Dpkg/BuildInfo.pm
index 7be6bc750..9c9ca68b2 100644
--- a/scripts/Dpkg/BuildInfo.pm
+++ b/scripts/Dpkg/BuildInfo.pm
@@ -13,6 +13,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::BuildInfo - handle build information
+
+=head1 DESCRIPTION
+
+The Dpkg::BuildInfo module provides functions to handle the build
+information.
+
+=cut
+
 package Dpkg::BuildInfo;
 
 use strict;
@@ -25,17 +38,6 @@ our @EXPORT_OK = qw(
 
 use Exporter qw(import);
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::BuildInfo - handle build information
-
-=head1 DESCRIPTION
-
-The Dpkg::BuildInfo module provides functions to handle the build
-information.
-
 =head1 FUNCTIONS
 
 =over 4
diff --git a/scripts/Dpkg/BuildOptions.pm b/scripts/Dpkg/BuildOptions.pm
index 62a84ead1..a8b5aa7cd 100644
--- a/scripts/Dpkg/BuildOptions.pm
+++ b/scripts/Dpkg/BuildOptions.pm
@@ -15,17 +15,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::BuildOptions;
-
-use strict;
-use warnings;
-
-our $VERSION = '1.02';
-
-use Dpkg::Gettext;
-use Dpkg::ErrorHandling;
-use Dpkg::BuildEnv;
-
 =encoding utf8
 
 =head1 NAME
@@ -38,6 +27,19 @@ This class can be used to manipulate options stored
 in environment variables like DEB_BUILD_OPTIONS and
 DEB_BUILD_MAINT_OPTIONS.
 
+=cut
+
+package Dpkg::BuildOptions;
+
+use strict;
+use warnings;
+
+our $VERSION = '1.02';
+
+use Dpkg::Gettext;
+use Dpkg::ErrorHandling;
+use Dpkg::BuildEnv;
+
 =head1 METHODS
 
 =over 4
diff --git a/scripts/Dpkg/BuildProfiles.pm b/scripts/Dpkg/BuildProfiles.pm
index df3ec48ec..d68bc0b71 100644
--- a/scripts/Dpkg/BuildProfiles.pm
+++ b/scripts/Dpkg/BuildProfiles.pm
@@ -13,6 +13,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::BuildProfiles - handle build profiles
+
+=head1 DESCRIPTION
+
+The Dpkg::BuildProfiles module provides functions to handle the build
+profiles.
+
+=cut
+
 package Dpkg::BuildProfiles;
 
 use strict;
@@ -34,17 +47,6 @@ use Dpkg::BuildEnv;
 my $cache_profiles;
 my @build_profiles;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::BuildProfiles - handle build profiles
-
-=head1 DESCRIPTION
-
-The Dpkg::BuildProfiles module provides functions to handle the build
-profiles.
-
 =head1 FUNCTIONS
 
 =over 4
diff --git a/scripts/Dpkg/BuildTypes.pm b/scripts/Dpkg/BuildTypes.pm
index 51f7af191..c53ec454c 100644
--- a/scripts/Dpkg/BuildTypes.pm
+++ b/scripts/Dpkg/BuildTypes.pm
@@ -14,6 +14,24 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::BuildTypes - track build types
+
+=head1 DESCRIPTION
+
+The Dpkg::BuildTypes module is used by various tools to track and decide
+what artifacts need to be built.
+
+The build types are bit constants that are exported by default. Multiple
+types can be ORed.
+
+B<Note>: This is a private module, its API can change at any time.
+
+=cut
+
 package Dpkg::BuildTypes;
 
 use strict;
@@ -42,22 +60,6 @@ use Exporter qw(import);
 use Dpkg::Gettext;
 use Dpkg::ErrorHandling;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::BuildTypes - track build types
-
-=head1 DESCRIPTION
-
-The Dpkg::BuildTypes module is used by various tools to track and decide
-what artifacts need to be built.
-
-The build types are bit constants that are exported by default. Multiple
-types can be ORed.
-
-B<Note>: This is a private module, its API can change at any time.
-
 =head1 CONSTANTS
 
 =over 4
diff --git a/scripts/Dpkg/Changelog/Entry.pm b/scripts/Dpkg/Changelog/Entry.pm
index 79b741d8d..26856dc8d 100644
--- a/scripts/Dpkg/Changelog/Entry.pm
+++ b/scripts/Dpkg/Changelog/Entry.pm
@@ -13,6 +13,20 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Changelog::Entry - represents a changelog entry
+
+=head1 DESCRIPTION
+
+This class represents a changelog entry. It is composed
+of a set of lines with specific purpose: a header line, changes lines, a
+trailer line. Blank lines can be between those kind of lines.
+
+=cut
+
 package Dpkg::Changelog::Entry;
 
 use strict;
@@ -31,18 +45,6 @@ use overload
     'eq' => sub { defined($_[1]) and "$_[0]" eq "$_[1]" },
     fallback => 1;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Changelog::Entry - represents a changelog entry
-
-=head1 DESCRIPTION
-
-This class represents a changelog entry. It is composed
-of a set of lines with specific purpose: a header line, changes lines, a
-trailer line. Blank lines can be between those kind of lines.
-
 =head1 METHODS
 
 =over 4
diff --git a/scripts/Dpkg/Changelog/Entry/Debian.pm 
b/scripts/Dpkg/Changelog/Entry/Debian.pm
index fee5be8b9..6f7a0e410 100644
--- a/scripts/Dpkg/Changelog/Entry/Debian.pm
+++ b/scripts/Dpkg/Changelog/Entry/Debian.pm
@@ -14,6 +14,21 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Changelog::Entry::Debian - represents a Debian changelog entry
+
+=head1 DESCRIPTION
+
+This class represents a Debian changelog entry.
+It implements the generic interface Dpkg::Changelog::Entry.
+Only functions specific to this implementation are described below,
+the rest are inherited.
+
+=cut
+
 package Dpkg::Changelog::Entry::Debian;
 
 use strict;
@@ -37,21 +52,6 @@ use Dpkg::Version;
 
 use parent qw(Dpkg::Changelog::Entry);
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Changelog::Entry::Debian - represents a Debian changelog entry
-
-=head1 DESCRIPTION
-
-This class represents a Debian changelog entry.
-It implements the generic interface Dpkg::Changelog::Entry.
-Only functions specific to this implementation are described below,
-the rest are inherited.
-
-=cut
-
 my $name_chars = qr/[-+0-9a-z.]/i;
 
 # The matched content is the source package name ($1), the version ($2),
diff --git a/scripts/Dpkg/Checksums.pm b/scripts/Dpkg/Checksums.pm
index 474444731..fdfd1bf8d 100644
--- a/scripts/Dpkg/Checksums.pm
+++ b/scripts/Dpkg/Checksums.pm
@@ -15,6 +15,20 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Checksums - generate and manipulate file checksums
+
+=head1 DESCRIPTION
+
+This module provides a class that can generate and manipulate
+various file checksums as well as some methods to query information
+about supported checksums.
+
+=cut
+
 package Dpkg::Checksums;
 
 use strict;
@@ -33,18 +47,6 @@ use Digest;
 use Dpkg::Gettext;
 use Dpkg::ErrorHandling;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Checksums - generate and manipulate file checksums
-
-=head1 DESCRIPTION
-
-This module provides a class that can generate and manipulate
-various file checksums as well as some methods to query information
-about supported checksums.
-
 =head1 FUNCTIONS
 
 =over 4
diff --git a/scripts/Dpkg/Compression.pm b/scripts/Dpkg/Compression.pm
index 189be8bda..cc5cfb418 100644
--- a/scripts/Dpkg/Compression.pm
+++ b/scripts/Dpkg/Compression.pm
@@ -14,6 +14,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Compression - simple database of available compression methods
+
+=head1 DESCRIPTION
+
+This modules provides a few public functions and a public regex to
+interact with the set of supported compression methods.
+
+=cut
+
 package Dpkg::Compression;
 
 use strict;
@@ -47,19 +60,6 @@ use List::Util qw(any);
 use Dpkg::ErrorHandling;
 use Dpkg::Gettext;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Compression - simple database of available compression methods
-
-=head1 DESCRIPTION
-
-This modules provides a few public functions and a public regex to
-interact with the set of supported compression methods.
-
-=cut
-
 my %COMP = (
     gzip => {
        file_ext => 'gz',
diff --git a/scripts/Dpkg/Compression/FileHandle.pm 
b/scripts/Dpkg/Compression/FileHandle.pm
index 5b3fd1c3d..50ce6f556 100644
--- a/scripts/Dpkg/Compression/FileHandle.pm
+++ b/scripts/Dpkg/Compression/FileHandle.pm
@@ -14,26 +14,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Compression::FileHandle;
-
-use strict;
-use warnings;
-
-our $VERSION = '1.01';
-
-use Carp;
-
-use Dpkg::Compression;
-use Dpkg::Compression::Process;
-use Dpkg::Gettext;
-use Dpkg::ErrorHandling;
-
-use parent qw(IO::File Tie::Handle);
-
-# Useful reference to understand some kludges required to
-# have the class behave like a filehandle
-# http://blog.woobling.org/2009/10/are-filehandles-objects.html
-
 =encoding utf8
 
 =head1 NAME
@@ -88,6 +68,28 @@ first read or write operation based on the filename set at 
creation time
 Once a file has been opened, the filehandle must be closed before being
 able to open another file.
 
+=cut
+
+package Dpkg::Compression::FileHandle;
+
+use strict;
+use warnings;
+
+our $VERSION = '1.01';
+
+use Carp;
+
+use Dpkg::Compression;
+use Dpkg::Compression::Process;
+use Dpkg::Gettext;
+use Dpkg::ErrorHandling;
+
+use parent qw(IO::File Tie::Handle);
+
+# Useful reference to understand some kludges required to
+# have the class behave like a filehandle
+# http://blog.woobling.org/2009/10/are-filehandles-objects.html
+
 =head1 STANDARD FUNCTIONS
 
 The standard functions acting on filehandles should accept a
diff --git a/scripts/Dpkg/Compression/Process.pm 
b/scripts/Dpkg/Compression/Process.pm
index 3f08d481e..fbf16cee2 100644
--- a/scripts/Dpkg/Compression/Process.pm
+++ b/scripts/Dpkg/Compression/Process.pm
@@ -14,6 +14,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Compression::Process - run compression/decompression processes
+
+=head1 DESCRIPTION
+
+This module provides an object oriented interface to run and manage
+compression/decompression processes.
+
+=cut
+
 package Dpkg::Compression::Process;
 
 use strict;
@@ -28,17 +41,6 @@ use Dpkg::ErrorHandling;
 use Dpkg::Gettext;
 use Dpkg::IPC;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Compression::Process - run compression/decompression processes
-
-=head1 DESCRIPTION
-
-This module provides an object oriented interface to run and manage
-compression/decompression processes.
-
 =head1 METHODS
 
 =over 4
diff --git a/scripts/Dpkg/Conf.pm b/scripts/Dpkg/Conf.pm
index 028a2939f..db452081b 100644
--- a/scripts/Dpkg/Conf.pm
+++ b/scripts/Dpkg/Conf.pm
@@ -13,6 +13,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Conf - parse dpkg configuration files
+
+=head1 DESCRIPTION
+
+The Dpkg::Conf object can be used to read options from a configuration
+file. It can export an array that can then be parsed exactly like @ARGV.
+
+=cut
+
 package Dpkg::Conf;
 
 use strict;
@@ -31,17 +44,6 @@ use overload
     '@{}' => sub { return [ $_[0]->get_options() ] },
     fallback => 1;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Conf - parse dpkg configuration files
-
-=head1 DESCRIPTION
-
-The Dpkg::Conf object can be used to read options from a configuration
-file. It can export an array that can then be parsed exactly like @ARGV.
-
 =head1 METHODS
 
 =over 4
diff --git a/scripts/Dpkg/Control.pm b/scripts/Dpkg/Control.pm
index 7da5993dd..726b26aa7 100644
--- a/scripts/Dpkg/Control.pm
+++ b/scripts/Dpkg/Control.pm
@@ -13,42 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Control;
-
-use strict;
-use warnings;
-
-our $VERSION = '1.03';
-our @EXPORT = qw(
-    CTRL_UNKNOWN
-    CTRL_INFO_SRC
-    CTRL_INFO_PKG
-    CTRL_INDEX_SRC
-    CTRL_INDEX_PKG
-    CTRL_REPO_RELEASE
-    CTRL_PKG_SRC
-    CTRL_PKG_DEB
-    CTRL_FILE_BUILDINFO
-    CTRL_FILE_CHANGES
-    CTRL_FILE_VENDOR
-    CTRL_FILE_STATUS
-    CTRL_CHANGELOG
-    CTRL_COPYRIGHT_HEADER
-    CTRL_COPYRIGHT_FILES
-    CTRL_COPYRIGHT_LICENSE
-    CTRL_TESTS
-);
-
-use Exporter qw(import);
-
-use Dpkg::Gettext;
-use Dpkg::ErrorHandling;
-use Dpkg::Control::Types;
-use Dpkg::Control::Hash;
-use Dpkg::Control::Fields;
-
-use parent qw(Dpkg::Control::Hash);
-
 =encoding utf8
 
 =head1 NAME
@@ -146,6 +110,44 @@ Corresponds to a package tests control file in 
F<debian/tests/control>.
 
 =back
 
+=cut
+
+package Dpkg::Control;
+
+use strict;
+use warnings;
+
+our $VERSION = '1.03';
+our @EXPORT = qw(
+    CTRL_UNKNOWN
+    CTRL_INFO_SRC
+    CTRL_INFO_PKG
+    CTRL_INDEX_SRC
+    CTRL_INDEX_PKG
+    CTRL_REPO_RELEASE
+    CTRL_PKG_SRC
+    CTRL_PKG_DEB
+    CTRL_FILE_BUILDINFO
+    CTRL_FILE_CHANGES
+    CTRL_FILE_VENDOR
+    CTRL_FILE_STATUS
+    CTRL_CHANGELOG
+    CTRL_COPYRIGHT_HEADER
+    CTRL_COPYRIGHT_FILES
+    CTRL_COPYRIGHT_LICENSE
+    CTRL_TESTS
+);
+
+use Exporter qw(import);
+
+use Dpkg::Gettext;
+use Dpkg::ErrorHandling;
+use Dpkg::Control::Types;
+use Dpkg::Control::Hash;
+use Dpkg::Control::Fields;
+
+use parent qw(Dpkg::Control::Hash);
+
 =head1 METHODS
 
 All the methods of Dpkg::Control::Hash are available. Those listed below
diff --git a/scripts/Dpkg/Control/Changelog.pm 
b/scripts/Dpkg/Control/Changelog.pm
index 9184cedbc..08e230de3 100644
--- a/scripts/Dpkg/Control/Changelog.pm
+++ b/scripts/Dpkg/Control/Changelog.pm
@@ -13,17 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Control::Changelog;
-
-use strict;
-use warnings;
-
-our $VERSION = '1.00';
-
-use Dpkg::Control;
-
-use parent qw(Dpkg::Control);
-
 =encoding utf8
 
 =head1 NAME
@@ -35,6 +24,19 @@ Dpkg::Control::Changelog - represent info fields output by 
dpkg-parsechangelog
 This class derives directly from Dpkg::Control with the type
 CTRL_CHANGELOG.
 
+=cut
+
+package Dpkg::Control::Changelog;
+
+use strict;
+use warnings;
+
+our $VERSION = '1.00';
+
+use Dpkg::Control;
+
+use parent qw(Dpkg::Control);
+
 =head1 METHODS
 
 =over 4
diff --git a/scripts/Dpkg/Control/Fields.pm b/scripts/Dpkg/Control/Fields.pm
index 33beeec56..0cae2523f 100644
--- a/scripts/Dpkg/Control/Fields.pm
+++ b/scripts/Dpkg/Control/Fields.pm
@@ -13,6 +13,21 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Control::Fields - manage (list of official) control fields
+
+=head1 DESCRIPTION
+
+The module contains a list of vendor-neutral and vendor-specific fieldnames
+with associated meta-data explaining in which type of control information
+they are allowed. The vendor-neutral fieldnames and all functions are
+inherited from Dpkg::Control::FieldsCore.
+
+=cut
+
 package Dpkg::Control::Fields;
 
 use strict;
@@ -45,19 +60,6 @@ foreach my $op (run_vendor_hook('register-custom-fields')) {
     }
 }
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Control::Fields - manage (list of official) control fields
-
-=head1 DESCRIPTION
-
-The module contains a list of vendor-neutral and vendor-specific fieldnames
-with associated meta-data explaining in which type of control information
-they are allowed. The vendor-neutral fieldnames and all functions are
-inherited from Dpkg::Control::FieldsCore.
-
 =head1 CHANGES
 
 =head2 Version 1.00 (dpkg 1.15.6)
diff --git a/scripts/Dpkg/Control/FieldsCore.pm 
b/scripts/Dpkg/Control/FieldsCore.pm
index 77216c7c1..12d5d9efa 100644
--- a/scripts/Dpkg/Control/FieldsCore.pm
+++ b/scripts/Dpkg/Control/FieldsCore.pm
@@ -13,6 +13,20 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Control::FieldsCore - manage (list of official) control fields
+
+=head1 DESCRIPTION
+
+The modules contains a list of fieldnames with associated meta-data explaining
+in which type of control information they are allowed. The types are the
+CTRL_* constants exported by Dpkg::Control.
+
+=cut
+
 package Dpkg::Control::FieldsCore;
 
 use strict;
@@ -1019,18 +1033,6 @@ our %FIELD_ORDER = (
     ],
 );
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Control::FieldsCore - manage (list of official) control fields
-
-=head1 DESCRIPTION
-
-The modules contains a list of fieldnames with associated meta-data explaining
-in which type of control information they are allowed. The types are the
-CTRL_* constants exported by Dpkg::Control.
-
 =head1 FUNCTIONS
 
 =over 4
diff --git a/scripts/Dpkg/Control/Hash.pm b/scripts/Dpkg/Control/Hash.pm
index 8b7f54f59..bda8c11cb 100644
--- a/scripts/Dpkg/Control/Hash.pm
+++ b/scripts/Dpkg/Control/Hash.pm
@@ -13,6 +13,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Control::Hash - parse and manipulate a stanza of deb822 fields
+
+=head1 DESCRIPTION
+
+This module is just like Dpkg::Control::HashCore, with vendor-specific
+field knowledge.
+
+=cut
+
 package Dpkg::Control::Hash;
 
 use strict;
@@ -26,17 +39,6 @@ use Dpkg::Control::Fields; # Force execution of vendor hook.
 
 use parent qw(Dpkg::Control::HashCore);
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Control::Hash - parse and manipulate a stanza of deb822 fields
-
-=head1 DESCRIPTION
-
-This module is just like Dpkg::Control::HashCore, with vendor-specific
-field knowledge.
-
 =head1 CHANGES
 
 =head2 Version 1.00 (dpkg 1.15.6)
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm
index fd02f5163..0be9de2c4 100644
--- a/scripts/Dpkg/Control/HashCore.pm
+++ b/scripts/Dpkg/Control/HashCore.pm
@@ -14,28 +14,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Control::HashCore;
-
-use strict;
-use warnings;
-
-our $VERSION = '1.02';
-
-use Dpkg::Gettext;
-use Dpkg::ErrorHandling;
-use Dpkg::Control::FieldsCore;
-use Dpkg::Control::HashCore::Tie;
-
-# This module cannot use Dpkg::Control::Fields, because that one makes use
-# of Dpkg::Vendor which at the same time uses this module, which would turn
-# into a compilation error. We can use Dpkg::Control::FieldsCore instead.
-
-use parent qw(Dpkg::Interface::Storable);
-
-use overload
-    '%{}' => sub { ${$_[0]}->{fields} },
-    'eq' => sub { "$_[0]" eq "$_[1]" };
-
 =encoding utf8
 
 =head1 NAME
@@ -62,6 +40,30 @@ modified. Empty lines and lines containing only dots are 
prefixed with
 During parsing, trailing spaces are stripped on all lines while leading
 spaces are stripped only on the first line of each field.
 
+=cut
+
+package Dpkg::Control::HashCore;
+
+use strict;
+use warnings;
+
+our $VERSION = '1.02';
+
+use Dpkg::Gettext;
+use Dpkg::ErrorHandling;
+use Dpkg::Control::FieldsCore;
+use Dpkg::Control::HashCore::Tie;
+
+# This module cannot use Dpkg::Control::Fields, because that one makes use
+# of Dpkg::Vendor which at the same time uses this module, which would turn
+# into a compilation error. We can use Dpkg::Control::FieldsCore instead.
+
+use parent qw(Dpkg::Interface::Storable);
+
+use overload
+    '%{}' => sub { ${$_[0]}->{fields} },
+    'eq' => sub { "$_[0]" eq "$_[1]" };
+
 =head1 METHODS
 
 =over 4
diff --git a/scripts/Dpkg/Control/Info.pm b/scripts/Dpkg/Control/Info.pm
index e4bc85e94..f6d552907 100644
--- a/scripts/Dpkg/Control/Info.pm
+++ b/scripts/Dpkg/Control/Info.pm
@@ -14,6 +14,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Control::Info - parse files like debian/control
+
+=head1 DESCRIPTION
+
+It provides a class to access data of files that follow the same
+syntax as F<debian/control>.
+
+=cut
+
 package Dpkg::Control::Info;
 
 use strict;
@@ -30,17 +43,6 @@ use parent qw(Dpkg::Interface::Storable);
 use overload
     '@{}' => sub { return [ $_[0]->{source}, @{$_[0]->{packages}} ] };
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Control::Info - parse files like debian/control
-
-=head1 DESCRIPTION
-
-It provides a class to access data of files that follow the same
-syntax as F<debian/control>.
-
 =head1 METHODS
 
 =over 4
diff --git a/scripts/Dpkg/Control/Tests.pm b/scripts/Dpkg/Control/Tests.pm
index 3c8d1c006..cd582d9d0 100644
--- a/scripts/Dpkg/Control/Tests.pm
+++ b/scripts/Dpkg/Control/Tests.pm
@@ -13,6 +13,19 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Control::Tests - parse files like debian/tests/control
+
+=head1 DESCRIPTION
+
+It provides a class to access data of files that follow the same
+syntax as F<debian/tests/control>.
+
+=cut
+
 package Dpkg::Control::Tests;
 
 use strict;
@@ -26,17 +39,6 @@ use Dpkg::Index;
 
 use parent qw(Dpkg::Index);
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Control::Tests - parse files like debian/tests/control
-
-=head1 DESCRIPTION
-
-It provides a class to access data of files that follow the same
-syntax as F<debian/tests/control>.
-
 =head1 METHODS
 
 All the methods of Dpkg::Index are available. Those listed below are either
diff --git a/scripts/Dpkg/Control/Tests/Entry.pm 
b/scripts/Dpkg/Control/Tests/Entry.pm
index cbcd7e888..cae4d0da9 100644
--- a/scripts/Dpkg/Control/Tests/Entry.pm
+++ b/scripts/Dpkg/Control/Tests/Entry.pm
@@ -13,6 +13,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Control::Tests::Entry - represents a test suite entry
+
+=head1 DESCRIPTION
+
+This class represents a test suite entry.
+
+=cut
+
 package Dpkg::Control::Tests::Entry;
 
 use strict;
@@ -26,16 +38,6 @@ use Dpkg::Control;
 
 use parent qw(Dpkg::Control);
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Control::Tests::Entry - represents a test suite entry
-
-=head1 DESCRIPTION
-
-This class represents a test suite entry.
-
 =head1 METHODS
 
 All the methods of Dpkg::Control are available. Those listed below are either
diff --git a/scripts/Dpkg/Control/Types.pm b/scripts/Dpkg/Control/Types.pm
index 5537af614..865f25497 100644
--- a/scripts/Dpkg/Control/Types.pm
+++ b/scripts/Dpkg/Control/Types.pm
@@ -11,6 +11,24 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Control::Types - export CTRL_* constants
+
+=head1 DESCRIPTION
+
+You should not use this module directly. Instead you more likely
+want to use Dpkg::Control which also re-exports the same constants.
+
+This module has been introduced solely to avoid a dependency loop
+between Dpkg::Control and Dpkg::Control::Fields.
+
+B<Note>: This is a private module, its API can change at any time.
+
+=cut
+
 package Dpkg::Control::Types;
 
 use strict;
@@ -39,24 +57,6 @@ our @EXPORT = qw(
 
 use Exporter qw(import);
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Control::Types - export CTRL_* constants
-
-=head1 DESCRIPTION
-
-You should not use this module directly. Instead you more likely
-want to use Dpkg::Control which also re-exports the same constants.
-
-This module has been introduced solely to avoid a dependency loop
-between Dpkg::Control and Dpkg::Control::Fields.
-
-B<Note>: This is a private module, its API can change at any time.
-
-=cut
-
 use constant {
     CTRL_UNKNOWN => 0,
     # First control stanza in debian/control.
diff --git a/scripts/Dpkg/Deps.pm b/scripts/Dpkg/Deps.pm
index 5afa38428..97a25603c 100644
--- a/scripts/Dpkg/Deps.pm
+++ b/scripts/Dpkg/Deps.pm
@@ -19,8 +19,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Deps;
-
 =encoding utf8
 
 =head1 NAME
@@ -35,14 +33,10 @@ dependencies.
 The most important function is deps_parse(), it turns a dependency line in
 a set of Dpkg::Deps::{Simple,AND,OR,Union} objects depending on the case.
 
-=head1 FUNCTIONS
-
-All the deps_* functions are exported by default.
-
-=over 4
-
 =cut
 
+package Dpkg::Deps;
+
 use strict;
 use warnings;
 use feature qw(current_sub);
@@ -70,6 +64,12 @@ use Dpkg::Deps::AND;
 use Dpkg::Deps::OR;
 use Dpkg::Deps::KnownFacts;
 
+=head1 FUNCTIONS
+
+All the deps_* functions are exported by default.
+
+=over 4
+
 =item deps_eval_implication($rel_p, $v_p, $rel_q, $v_q)
 
 ($rel_p, $v_p) and ($rel_q, $v_q) express two dependencies as (relation,
diff --git a/scripts/Dpkg/Deps/AND.pm b/scripts/Dpkg/Deps/AND.pm
index 7b403c237..064384eaa 100644
--- a/scripts/Dpkg/Deps/AND.pm
+++ b/scripts/Dpkg/Deps/AND.pm
@@ -19,8 +19,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Deps::AND;
-
 =encoding utf8
 
 =head1 NAME
@@ -34,6 +32,8 @@ time. It inherits from Dpkg::Deps::Multiple.
 
 =cut
 
+package Dpkg::Deps::AND;
+
 use strict;
 use warnings;
 
diff --git a/scripts/Dpkg/Deps/KnownFacts.pm b/scripts/Dpkg/Deps/KnownFacts.pm
index ef8655fdd..5145e62c8 100644
--- a/scripts/Dpkg/Deps/KnownFacts.pm
+++ b/scripts/Dpkg/Deps/KnownFacts.pm
@@ -19,8 +19,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Deps::KnownFacts;
-
 =encoding utf8
 
 =head1 NAME
@@ -34,6 +32,8 @@ packages provided (by the set of installed packages).
 
 =cut
 
+package Dpkg::Deps::KnownFacts;
+
 use strict;
 use warnings;
 
diff --git a/scripts/Dpkg/Deps/Multiple.pm b/scripts/Dpkg/Deps/Multiple.pm
index da12f5184..a32a223dd 100644
--- a/scripts/Dpkg/Deps/Multiple.pm
+++ b/scripts/Dpkg/Deps/Multiple.pm
@@ -19,8 +19,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Deps::Multiple;
-
 =encoding utf8
 
 =head1 NAME
@@ -34,6 +32,8 @@ of dependencies. It is the base class for 
Dpkg::Deps::{AND,OR,Union}.
 
 =cut
 
+package Dpkg::Deps::Multiple;
+
 use strict;
 use warnings;
 
diff --git a/scripts/Dpkg/Deps/OR.pm b/scripts/Dpkg/Deps/OR.pm
index 4ce5c9818..fea4d355d 100644
--- a/scripts/Dpkg/Deps/OR.pm
+++ b/scripts/Dpkg/Deps/OR.pm
@@ -19,8 +19,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Deps::OR;
-
 =encoding utf8
 
 =head1 NAME
@@ -34,6 +32,8 @@ for the dependency to be true. It inherits from 
Dpkg::Deps::Multiple.
 
 =cut
 
+package Dpkg::Deps::OR;
+
 use strict;
 use warnings;
 
diff --git a/scripts/Dpkg/Deps/Simple.pm b/scripts/Dpkg/Deps/Simple.pm
index e6ed550b9..e0fe0e408 100644
--- a/scripts/Dpkg/Deps/Simple.pm
+++ b/scripts/Dpkg/Deps/Simple.pm
@@ -19,8 +19,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Deps::Simple;
-
 =encoding utf8
 
 =head1 NAME
@@ -68,12 +66,10 @@ is no restriction formula. Otherwise it is an array ref.
 
 =back
 
-=head1 METHODS
-
-=over 4
-
 =cut
 
+package Dpkg::Deps::Simple;
+
 use strict;
 use warnings;
 
@@ -89,6 +85,10 @@ use Dpkg::Gettext;
 
 use parent qw(Dpkg::Interface::Storable);
 
+=head1 METHODS
+
+=over 4
+
 =item $dep = Dpkg::Deps::Simple->new([$dep[, %opts]]);
 
 Creates a new object. Some options can be set through %opts:
diff --git a/scripts/Dpkg/Deps/Union.pm b/scripts/Dpkg/Deps/Union.pm
index 148e38ed3..f515e7772 100644
--- a/scripts/Dpkg/Deps/Union.pm
+++ b/scripts/Dpkg/Deps/Union.pm
@@ -19,8 +19,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Deps::Union;
-
 =encoding utf8
 
 =head1 NAME
@@ -34,6 +32,8 @@ It inherits from Dpkg::Deps::Multiple.
 
 =cut
 
+package Dpkg::Deps::Union;
+
 use strict;
 use warnings;
 
diff --git a/scripts/Dpkg/Exit.pm b/scripts/Dpkg/Exit.pm
index 460b4eec1..eb596eaef 100644
--- a/scripts/Dpkg/Exit.pm
+++ b/scripts/Dpkg/Exit.pm
@@ -14,6 +14,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Exit - program exit handlers
+
+=head1 DESCRIPTION
+
+The Dpkg::Exit module provides support functions to run handlers on exit.
+
+=cut
+
 package Dpkg::Exit;
 
 use strict;
@@ -30,16 +42,6 @@ use Exporter qw(import);
 
 my @handlers = ();
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Exit - program exit handlers
-
-=head1 DESCRIPTION
-
-The Dpkg::Exit module provides support functions to run handlers on exit.
-
 =head1 FUNCTIONS
 
 =over 4
diff --git a/scripts/Dpkg/Gettext.pm b/scripts/Dpkg/Gettext.pm
index bac8f57cb..f550d0eb4 100644
--- a/scripts/Dpkg/Gettext.pm
+++ b/scripts/Dpkg/Gettext.pm
@@ -24,6 +24,20 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Gettext - convenience wrapper around Locale::gettext
+
+=head1 DESCRIPTION
+
+The Dpkg::Gettext module is a convenience wrapper over the Locale::gettext
+module, to guarantee we always have working gettext functions, and to add
+some commonly used aliases.
+
+=cut
+
 package Dpkg::Gettext;
 
 use strict;
@@ -42,18 +56,6 @@ our @EXPORT = qw(
 
 use Exporter qw(import);
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Gettext - convenience wrapper around Locale::gettext
-
-=head1 DESCRIPTION
-
-The Dpkg::Gettext module is a convenience wrapper over the Locale::gettext
-module, to guarantee we always have working gettext functions, and to add
-some commonly used aliases.
-
 =head1 ENVIRONMENT
 
 =over 4
diff --git a/scripts/Dpkg/IPC.pm b/scripts/Dpkg/IPC.pm
index 250364203..0bc9b72b5 100644
--- a/scripts/Dpkg/IPC.pm
+++ b/scripts/Dpkg/IPC.pm
@@ -15,6 +15,21 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::IPC - helper functions for IPC
+
+=head1 DESCRIPTION
+
+Dpkg::IPC offers helper functions to allow you to execute
+other programs in an easy, yet flexible way, while hiding
+all the gory details of IPC (Inter-Process Communication)
+from you.
+
+=cut
+
 package Dpkg::IPC;
 
 use strict;
@@ -32,19 +47,6 @@ use Exporter qw(import);
 use Dpkg::ErrorHandling;
 use Dpkg::Gettext;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::IPC - helper functions for IPC
-
-=head1 DESCRIPTION
-
-Dpkg::IPC offers helper functions to allow you to execute
-other programs in an easy, yet flexible way, while hiding
-all the gory details of IPC (Inter-Process Communication)
-from you.
-
 =head1 FUNCTIONS
 
 =over 4
diff --git a/scripts/Dpkg/Index.pm b/scripts/Dpkg/Index.pm
index 46027d07b..3be79050b 100644
--- a/scripts/Dpkg/Index.pm
+++ b/scripts/Dpkg/Index.pm
@@ -14,6 +14,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Index - generic index of control information
+
+=head1 DESCRIPTION
+
+This class represent a set of Dpkg::Control objects.
+
+=cut
+
 package Dpkg::Index;
 
 use strict;
@@ -31,16 +43,6 @@ use overload
     '@{}' => sub { return $_[0]->{order} },
     fallback => 1;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Index - generic index of control information
-
-=head1 DESCRIPTION
-
-This class represent a set of Dpkg::Control objects.
-
 =head1 METHODS
 
 =over 4
diff --git a/scripts/Dpkg/Interface/Storable.pm 
b/scripts/Dpkg/Interface/Storable.pm
index 5ac078ac1..a9880c74e 100644
--- a/scripts/Dpkg/Interface/Storable.pm
+++ b/scripts/Dpkg/Interface/Storable.pm
@@ -13,6 +13,20 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Interface::Storable - common methods related to object serialization
+
+=head1 DESCRIPTION
+
+Dpkg::Interface::Storable is only meant to be used as parent
+class for other classes. It provides common methods that are
+all implemented on top of two basic methods parse() and output().
+
+=cut
+
 package Dpkg::Interface::Storable;
 
 use strict;
@@ -29,18 +43,6 @@ use overload
     '""' => \&_stringify,
     'fallback' => 1;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Interface::Storable - common methods related to object serialization
-
-=head1 DESCRIPTION
-
-Dpkg::Interface::Storable is only meant to be used as parent
-class for other classes. It provides common methods that are
-all implemented on top of two basic methods parse() and output().
-
 =head1 BASE METHODS
 
 Those methods must be provided by the class that wish to inherit
diff --git a/scripts/Dpkg/Path.pm b/scripts/Dpkg/Path.pm
index e9dff5cf3..bbb1bd28f 100644
--- a/scripts/Dpkg/Path.pm
+++ b/scripts/Dpkg/Path.pm
@@ -14,6 +14,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Path - some common path handling functions
+
+=head1 DESCRIPTION
+
+It provides some functions to handle various path.
+
+=cut
+
 package Dpkg::Path;
 
 use strict;
@@ -44,16 +56,6 @@ use Dpkg::Gettext;
 use Dpkg::Arch qw(get_host_arch debarch_to_debtuple);
 use Dpkg::IPC;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Path - some common path handling functions
-
-=head1 DESCRIPTION
-
-It provides some functions to handle various path.
-
 =head1 FUNCTIONS
 
 =over 8
diff --git a/scripts/Dpkg/Source/Format.pm b/scripts/Dpkg/Source/Format.pm
index 41596a233..22661ca04 100644
--- a/scripts/Dpkg/Source/Format.pm
+++ b/scripts/Dpkg/Source/Format.pm
@@ -14,8 +14,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Source::Format;
-
 =encoding utf8
 
 =head1 NAME
@@ -29,6 +27,8 @@ package F<debian/source/format> files.
 
 =cut
 
+package Dpkg::Source::Format;
+
 use strict;
 use warnings;
 
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index 412ea5d92..3eb2e8d14 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -14,8 +14,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Source::Package;
-
 =encoding utf8
 
 =head1 NAME
@@ -31,6 +29,8 @@ is the one that supports the extraction of the source package.
 
 =cut
 
+package Dpkg::Source::Package;
+
 use strict;
 use warnings;
 
diff --git a/scripts/Dpkg/Substvars.pm b/scripts/Dpkg/Substvars.pm
index d2abc3fc4..812e68060 100644
--- a/scripts/Dpkg/Substvars.pm
+++ b/scripts/Dpkg/Substvars.pm
@@ -14,6 +14,18 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Substvars - handle variable substitution in strings
+
+=head1 DESCRIPTION
+
+It provides a class which is able to substitute variables in strings.
+
+=cut
+
 package Dpkg::Substvars;
 
 use strict;
@@ -32,18 +44,6 @@ use parent qw(Dpkg::Interface::Storable);
 
 my $maxsubsts = 50;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Substvars - handle variable substitution in strings
-
-=head1 DESCRIPTION
-
-It provides a class which is able to substitute variables in strings.
-
-=cut
-
 use constant {
     SUBSTVAR_ATTR_USED => 1,
     SUBSTVAR_ATTR_AUTO => 2,
diff --git a/scripts/Dpkg/Vendor.pm b/scripts/Dpkg/Vendor.pm
index 059e44223..85eac5cf7 100644
--- a/scripts/Dpkg/Vendor.pm
+++ b/scripts/Dpkg/Vendor.pm
@@ -14,6 +14,34 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Vendor - get access to some vendor specific information
+
+=head1 DESCRIPTION
+
+The files in $Dpkg::CONFDIR/origins/ can provide information about various
+vendors who are providing Debian packages. Currently those files look like
+this:
+
+  Vendor: Debian
+  Vendor-URL: https://www.debian.org/
+  Bugs: debbugs://bugs.debian.org
+
+If the vendor derives from another vendor, the file should document
+the relationship by listing the base distribution in the Parent field:
+
+  Parent: Debian
+
+The file should be named according to the vendor name. The usual convention
+is to name the vendor file using the vendor name in all lowercase, but some
+variation is permitted. Namely, spaces are mapped to dashes ('-'), and the
+file can have the same casing as the Vendor field, or it can be capitalized.
+
+=cut
+
 package Dpkg::Vendor;
 
 use strict;
@@ -42,32 +70,6 @@ use Dpkg::Control::HashCore;
 my $origins = "$Dpkg::CONFDIR/origins";
 $origins = $ENV{DPKG_ORIGINS_DIR} if $ENV{DPKG_ORIGINS_DIR};
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Vendor - get access to some vendor specific information
-
-=head1 DESCRIPTION
-
-The files in $Dpkg::CONFDIR/origins/ can provide information about various
-vendors who are providing Debian packages. Currently those files look like
-this:
-
-  Vendor: Debian
-  Vendor-URL: https://www.debian.org/
-  Bugs: debbugs://bugs.debian.org
-
-If the vendor derives from another vendor, the file should document
-the relationship by listing the base distribution in the Parent field:
-
-  Parent: Debian
-
-The file should be named according to the vendor name. The usual convention
-is to name the vendor file using the vendor name in all lowercase, but some
-variation is permitted. Namely, spaces are mapped to dashes ('-'), and the
-file can have the same casing as the Vendor field, or it can be capitalized.
-
 =head1 FUNCTIONS
 
 =over 4
diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm
index 43940625e..2177f8f9f 100644
--- a/scripts/Dpkg/Vendor/Debian.pm
+++ b/scripts/Dpkg/Vendor/Debian.pm
@@ -18,20 +18,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Vendor::Debian;
-
-use strict;
-use warnings;
-
-our $VERSION = '0.01';
-
-use Dpkg;
-use Dpkg::Gettext;
-use Dpkg::ErrorHandling;
-use Dpkg::Control::Types;
-
-use parent qw(Dpkg::Vendor::Default);
-
 =encoding utf8
 
 =head1 NAME
@@ -47,6 +33,20 @@ B<Note>: This is a private module, its API can change at any 
time.
 
 =cut
 
+package Dpkg::Vendor::Debian;
+
+use strict;
+use warnings;
+
+our $VERSION = '0.01';
+
+use Dpkg;
+use Dpkg::Gettext;
+use Dpkg::ErrorHandling;
+use Dpkg::Control::Types;
+
+use parent qw(Dpkg::Vendor::Default);
+
 sub run_hook {
     my ($self, $hook, @params) = @_;
 
diff --git a/scripts/Dpkg/Vendor/Default.pm b/scripts/Dpkg/Vendor/Default.pm
index 004b6611d..0b451631a 100644
--- a/scripts/Dpkg/Vendor/Default.pm
+++ b/scripts/Dpkg/Vendor/Default.pm
@@ -13,17 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Vendor::Default;
-
-use strict;
-use warnings;
-
-our $VERSION = '0.01';
-
-# If you use this file as template to create a new vendor class, please
-# uncomment the following lines
-#use parent qw(Dpkg::Vendor::Default);
-
 =encoding utf8
 
 =head1 NAME
@@ -46,6 +35,19 @@ we avoid breaking your code.
 
 B<Note>: This is a private module, its API can change at any time.
 
+=cut
+
+package Dpkg::Vendor::Default;
+
+use strict;
+use warnings;
+
+our $VERSION = '0.01';
+
+# If you use this file as template to create a new vendor class, please
+# uncomment the following lines
+#use parent qw(Dpkg::Vendor::Default);
+
 =head1 METHODS
 
 =over 4
diff --git a/scripts/Dpkg/Vendor/Devuan.pm b/scripts/Dpkg/Vendor/Devuan.pm
index f7aa2c454..27931913a 100644
--- a/scripts/Dpkg/Vendor/Devuan.pm
+++ b/scripts/Dpkg/Vendor/Devuan.pm
@@ -13,15 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Vendor::Devuan;
-
-use strict;
-use warnings;
-
-our $VERSION = '0.01';
-
-use parent qw(Dpkg::Vendor::Debian);
-
 =encoding utf8
 
 =head1 NAME
@@ -37,6 +28,15 @@ B<Note>: This is a private module, its API can change at any 
time.
 
 =cut
 
+package Dpkg::Vendor::Devuan;
+
+use strict;
+use warnings;
+
+our $VERSION = '0.01';
+
+use parent qw(Dpkg::Vendor::Debian);
+
 sub run_hook {
     my ($self, $hook, @params) = @_;
 
diff --git a/scripts/Dpkg/Vendor/Ubuntu.pm b/scripts/Dpkg/Vendor/Ubuntu.pm
index f3b716239..71e0370cb 100644
--- a/scripts/Dpkg/Vendor/Ubuntu.pm
+++ b/scripts/Dpkg/Vendor/Ubuntu.pm
@@ -17,21 +17,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-package Dpkg::Vendor::Ubuntu;
-
-use strict;
-use warnings;
-
-our $VERSION = '0.01';
-
-use List::Util qw(any);
-
-use Dpkg::ErrorHandling;
-use Dpkg::Gettext;
-use Dpkg::Control::Types;
-
-use parent qw(Dpkg::Vendor::Debian);
-
 =encoding utf8
 
 =head1 NAME
@@ -47,6 +32,21 @@ B<Note>: This is a private module, its API can change at any 
time.
 
 =cut
 
+package Dpkg::Vendor::Ubuntu;
+
+use strict;
+use warnings;
+
+our $VERSION = '0.01';
+
+use List::Util qw(any);
+
+use Dpkg::ErrorHandling;
+use Dpkg::Gettext;
+use Dpkg::Control::Types;
+
+use parent qw(Dpkg::Vendor::Debian);
+
 sub run_hook {
     my ($self, $hook, @params) = @_;
 
diff --git a/scripts/Dpkg/Version.pm b/scripts/Dpkg/Version.pm
index 51d46c543..190e99757 100644
--- a/scripts/Dpkg/Version.pm
+++ b/scripts/Dpkg/Version.pm
@@ -16,6 +16,22 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+=encoding utf8
+
+=head1 NAME
+
+Dpkg::Version - handling and comparing dpkg-style version numbers
+
+=head1 DESCRIPTION
+
+The Dpkg::Version module provides pure-Perl routines to compare
+dpkg-style version numbers (as used in Debian packages) and also
+an object oriented interface overriding perl operators
+to do the right thing when you compare Dpkg::Version object between
+them.
+
+=cut
+
 package Dpkg::Version;
 
 use strict;
@@ -59,20 +75,6 @@ use overload
     'bool' => sub { return $_[0]->is_valid(); },
     'fallback' => 1;
 
-=encoding utf8
-
-=head1 NAME
-
-Dpkg::Version - handling and comparing dpkg-style version numbers
-
-=head1 DESCRIPTION
-
-The Dpkg::Version module provides pure-Perl routines to compare
-dpkg-style version numbers (as used in Debian packages) and also
-an object oriented interface overriding perl operators
-to do the right thing when you compare Dpkg::Version object between
-them.
-
 =head1 METHODS
 
 =over 4

-- 
Dpkg.Org's dpkg

Reply via email to