]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Rename Locale::Country to Locale::Codes::Country in various scripts.
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 22 Apr 2015 16:18:38 +0000 (18:18 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Wed, 22 Apr 2015 16:18:38 +0000 (18:18 +0200)
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
config/cfgroot/geoip-functions.pl
html/cgi-bin/country.cgi
html/cgi-bin/tor.cgi

index 29f7e8c6b8c80e6d1fdf0fb39d4a8d02fad3ca7b..2b5cd1977f6502c024e0c9c4cbbfad22d87cd764 100644 (file)
@@ -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
index 68b6f503d78019d8afc7d9f08277744d70b8b96e..85a8dc84f780d5ad4ca9f7a5e75962582bb8cc3d 100644 (file)
@@ -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;
index 76035fb46d76ad0c4775e300e8d4c975dcc2b36f..65ce154337f9f5f635005aa7b1e21cb90acf36a3 100644 (file)
@@ -21,7 +21,7 @@
 
 use strict;
 
-use Locale::Country;
+use Locale::Codes::Country;
 
 my $flagdir = '/srv/web/ipfire/html/images/flags';
 my $lines = '1';
index 228b5d48c2ca14598a22cc3431b02adf85dfb766..e00bc5fd50b7649b8d7542c7de2807a7c463d8e4 100644 (file)
@@ -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
                                                <option value=''>- $Lang::tr{'tor exit country any'} -</option>
 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 "<option value='$country_code'";