mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 03:33:25 +02:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user