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=8c086e076358b699616ea0b08e38bc24362e4135 commit 8c086e076358b699616ea0b08e38bc24362e4135 Author: Guillem Jover <[email protected]> AuthorDate: Thu Dec 22 02:21:40 2022 +0100 Dpkg::Compression: Move the POD for each function immediately before it This makes the documentation more clear, as it's close to the actual function it is documenting. --- scripts/Dpkg/Compression.pm | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/Dpkg/Compression.pm b/scripts/Dpkg/Compression.pm index b0277b698..6da2310a8 100644 --- a/scripts/Dpkg/Compression.pm +++ b/scripts/Dpkg/Compression.pm @@ -196,6 +196,12 @@ sub compression_get_file_extension { Return the default compression method. It is "xz" unless C<compression_set_default> has been used to change it. +=cut + +sub compression_get_default { + return $default_compression; +} + =item compression_set_default($comp) Change the default compression method. Errors out if the @@ -203,10 +209,6 @@ given compression method is not supported. =cut -sub compression_get_default { - return $default_compression; -} - sub compression_set_default { my $method = shift; error(g_('%s is not a supported compression'), $method) @@ -220,12 +222,6 @@ Return the default compression level used when compressing data. It's "9" for "gzip" and "bzip2", "6" for "xz" and "lzma", unless C<compression_set_default_level> has been used to change it. -=item compression_set_default_level($level) - -Change the default compression level. Passing undef as the level will -reset it to the compressor specific default, otherwise errors out if the -level is not valid (see C<compression_is_valid_level>). - =cut sub compression_get_default_level { @@ -236,6 +232,14 @@ sub compression_get_default_level { } } +=item compression_set_default_level($level) + +Change the default compression level. Passing undef as the level will +reset it to the compressor specific default, otherwise errors out if the +level is not valid (see C<compression_is_valid_level>). + +=cut + sub compression_set_default_level { my $level = shift; error(g_('%s is not a compression level'), $level) -- Dpkg.Org's dpkg

