From b013822b996302d7c3344019fe555d60280ef5c2 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Wed, 22 Apr 2015 18:18:38 +0200 Subject: [PATCH] Rename Locale::Country to Locale::Codes::Country in various scripts. The new Locale-Country version needs to be loaded and used by specifing Locale::Codes::Country since an upstream API change. Adjusting various perl scripts to use the module in the proper way again. --- config/cfgroot/general-functions.pl | 2 +- config/cfgroot/geoip-functions.pl | 4 ++-- html/cgi-bin/country.cgi | 2 +- html/cgi-bin/tor.cgi | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 29f7e8c6b8..2b5cd1977f 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -17,7 +17,7 @@ package General; use strict; use Socket; use IO::Socket; -use Locale::Country; +use Locale::Codes::Country; use Net::SSLeay; use Net::IPv4Addr qw(:all); $|=1; # line buffering diff --git a/config/cfgroot/geoip-functions.pl b/config/cfgroot/geoip-functions.pl index 68b6f503d7..85a8dc84f7 100644 --- a/config/cfgroot/geoip-functions.pl +++ b/config/cfgroot/geoip-functions.pl @@ -23,7 +23,7 @@ package GeoIP; -use Locale::Country; +use Locale::Codes::Country; # Function to get the flag icon for a specified country code. sub get_flag_icon($) { @@ -81,7 +81,7 @@ sub get_full_country_name($) { elsif ($code eq "yu") { $name = "Yugoslavia" } else { # Use perl built-in module to get the country code. - $name = &Locale::Country::code2country($code); + $name = &Locale::Codes::Country::code2country($code); } return $name; diff --git a/html/cgi-bin/country.cgi b/html/cgi-bin/country.cgi index 76035fb46d..65ce154337 100644 --- a/html/cgi-bin/country.cgi +++ b/html/cgi-bin/country.cgi @@ -21,7 +21,7 @@ use strict; -use Locale::Country; +use Locale::Codes::Country; my $flagdir = '/srv/web/ipfire/html/images/flags'; my $lines = '1'; diff --git a/html/cgi-bin/tor.cgi b/html/cgi-bin/tor.cgi index 228b5d48c2..e00bc5fd50 100644 --- a/html/cgi-bin/tor.cgi +++ b/html/cgi-bin/tor.cgi @@ -20,7 +20,7 @@ ############################################################################### use strict; -use Locale::Country; +use Locale::Codes::Country; # enable only the following on debugging purpose use warnings; @@ -323,9 +323,9 @@ END END - my @country_names = Locale::Country::all_country_names(); + my @country_names = Locale::Codes::Country::all_country_names(); foreach my $country_name (sort @country_names) { - my $country_code = Locale::Country::country2code($country_name); + my $country_code = Locale::Codes::Country::country2code($country_name); $country_code = uc($country_code); print "