diff options
author | Guillem Jover <guillem@debian.org> | 2013-07-18 02:21:18 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2013-11-24 05:40:36 +0100 |
commit | 0ee33bbd23c4500b36c23da59db8f832f03b5c79 (patch) | |
tree | d6122b667f78f1e51fb3fc701455bfeff54d711a /scripts/Dpkg/Compression | |
parent | b8e79194cb0c1524a81f5b33f2514620998e28a2 (diff) | |
download | dpkg-0ee33bbd23c4500b36c23da59db8f832f03b5c79.tar.gz |
Dpkg::Compression: Add new compression_get_file_extension_regex() function
Replace all direct accesses to $compression_re_file_ext with calls to
the new function, and mark the variable as deprecated to be removed on
VERSION 2.00.
Addresses Variables::ProhibitPackageVars.
Warned-by: perlcritic
Diffstat (limited to 'scripts/Dpkg/Compression')
-rw-r--r-- | scripts/Dpkg/Compression/FileHandle.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/Dpkg/Compression/FileHandle.pm b/scripts/Dpkg/Compression/FileHandle.pm index 884394cd4..4ca2a5909 100644 --- a/scripts/Dpkg/Compression/FileHandle.pm +++ b/scripts/Dpkg/Compression/FileHandle.pm @@ -306,7 +306,8 @@ sub set_filename { if (defined($add_comp_ext)) { *$self->{add_comp_ext} = $add_comp_ext; } - if (*$self->{add_comp_ext} and $filename =~ /\.$compression_re_file_ext$/) { + my $comp_ext_regex = compression_get_file_extension_regex(); + if (*$self->{add_comp_ext} and $filename =~ /\.$comp_ext_regex$/) { warning('filename %s already has an extension of a compressed file ' . 'and add_comp_ext is active', $filename); } |