Browse Source

Fix perl deprecation warnings.

tags/2.73
Cyril Brulebois 4 years ago
parent
commit
aebe8c7b0b
2 changed files with 7 additions and 4 deletions
  1. +3
    -0
      debian/changelog
  2. +4
    -4
      mirrorlist

+ 3
- 0
debian/changelog View File

@@ -1,6 +1,9 @@
choose-mirror (2.73) UNRELEASED; urgency=medium

* Update Mirrors.masterlist
* Fix perl deprecation warnings by adding a backslash before each
problematic character in mirrorlist script:
- Unescaped left brace in regex is deprecated

-- Cyril Brulebois <kibi@debian.org> Wed, 19 Oct 2016 02:11:21 +0200



+ 4
- 4
mirrorlist View File

@@ -62,14 +62,14 @@ close IN;
# This is useful if you have a mirror hierarchy using wildcard DNS.
# Use a C-style for loop because we may modify $id in the middle of it.
for (my $id = 0; $id < @data; $id++) {
if ($data[$id]->{site} =~ /\${CC}/) {
if ($data[$id]->{site} =~ /\$\{CC}/) {
my @expanded;
foreach my $cc (sort keys %iso3166) {
my %entry = %{$data[$id]};
for my $field (keys %entry) {
$entry{$field} =~ s/\${CC}/lc($cc)/eg;
$entry{$field} =~ s/\${UCC}/uc($cc)/eg;
$entry{$field} =~ s/\${CNAME}/$iso3166{$cc}/g;
$entry{$field} =~ s/\$\{CC}/lc($cc)/eg;
$entry{$field} =~ s/\$\{UCC}/uc($cc)/eg;
$entry{$field} =~ s/\$\{CNAME}/$iso3166{$cc}/g;
}
push @expanded, \%entry;
}


Loading…
Cancel
Save