summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2019-11-16 00:29:13 +0100
committerGuillem Jover <guillem@debian.org>2019-11-26 02:42:44 +0100
commitab8176cb9a92a39d062da002cf9192bdc6e5f3d1 (patch)
tree9a68c30093cdaed329e41b8e56d509d3dacdc56a
parent7656016155c2dc408c4659d050a6e4bedb741069 (diff)
downloaddpkg-ab8176cb9a92a39d062da002cf9192bdc6e5f3d1.tar.gz
Dpkg::Compression: Hide internal lowercase variables
Bump module version to 2.00.
-rw-r--r--debian/changelog3
-rw-r--r--scripts/Dpkg/Compression.pm17
2 files changed, 12 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog
index 69d274984..28373d1c6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -54,6 +54,9 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
- Dpkg::Changelog::Parse: Remove warnings of obsolete options forceplugin
and libdir. Remove obsolete functions changelog_parse_debian() and
changelog_parse_plugin().
+ - Dpkg::Compression: Hide internal lowercase variables
+ $default_compression, $default_compression_level and
+ $compression_re_file_ext.
* Documentation:
- man: Fix uncommon wording constructs.
- man: Use a minus sign for a literal string.
diff --git a/scripts/Dpkg/Compression.pm b/scripts/Dpkg/Compression.pm
index 3dbc4adf0..5bbe7f427 100644
--- a/scripts/Dpkg/Compression.pm
+++ b/scripts/Dpkg/Compression.pm
@@ -19,9 +19,8 @@ package Dpkg::Compression;
use strict;
use warnings;
-our $VERSION = '1.02';
+our $VERSION = '2.00';
our @EXPORT = qw(
- $compression_re_file_ext
compression_is_supported
compression_get_list
compression_get_property
@@ -98,14 +97,11 @@ if ($Config{cf_by} eq 'Debian Project') {
push @{$COMP->{gzip}->{comp_prog}}, '--rsyncable';
}
-# XXX: Backwards compatibility, stop exporting on VERSION 2.00.
-## no critic (Variables::ProhibitPackageVars)
-our $default_compression = 'xz';
-our $default_compression_level = undef;
+my $default_compression = 'xz';
+my $default_compression_level = undef;
my $regex = join '|', map { $_->{file_ext} } values %$COMP;
-our $compression_re_file_ext = qr/(?:$regex)/;
-## use critic
+my $compression_re_file_ext = qr/(?:$regex)/;
=head1 FUNCTIONS
@@ -250,6 +246,11 @@ sub compression_is_valid_level {
=head1 CHANGES
+=head2 Version 2.00 (dpkg 1.20.0)
+
+Hide variables: $default_compression, $default_compression_level
+and $compression_re_file_ext.
+
=head2 Version 1.02 (dpkg 1.17.2)
New function: compression_get_file_extension_regex()