1N/A# Locale::Country - ISO codes for country identification (ISO 3166) 1N/A#----------------------------------------------------------------------- 1N/A# Public Global Variables 1N/A#----------------------------------------------------------------------- 1N/A#----------------------------------------------------------------------- 1N/A# Private Global Variables 1N/A#----------------------------------------------------------------------- 1N/A#======================================================================= 1N/A# code2country ( CODE [, CODESET ] ) 1N/A#======================================================================= 1N/A #------------------------------------------------------------------- 1N/A # Make sure the code is in the right form before we use it 1N/A # to look up the corresponding country. 1N/A # We have to sprintf because the codes are given as 3-digits, 1N/A # with leading 0's. Eg 052 for Barbados. 1N/A #------------------------------------------------------------------- 1N/A #--------------------------------------------------------------- 1N/A # no such country code! 1N/A #--------------------------------------------------------------- 1N/A#======================================================================= 1N/A# country2code ( NAME [, CODESET ] ) 1N/A#======================================================================= 1N/A #--------------------------------------------------------------- 1N/A #--------------------------------------------------------------- 1N/A#======================================================================= 1N/A# country_code2code ( NAME [, CODESET ] ) 1N/A#======================================================================= 1N/A (@_ ==
3)
or croak "country_code2code() takes 3 arguments!";
1N/A#======================================================================= 1N/A# all_country_codes ( [ CODESET ] ) 1N/A#======================================================================= 1N/A#======================================================================= 1N/A# all_country_names ( [ CODESET ] ) 1N/A#======================================================================= 1N/A#======================================================================= 1N/A# alias_code ( ALIAS => CODE [ , CODESET ] ) 1N/A# Add an alias for an existing code. If the CODESET isn't specified, 1N/A# then we use the default (currently the alpha-2 codeset). 1N/A# Locale::Country::alias_code('uk' => 'gb'); 1N/A#======================================================================= 1N/A carp "attempt to alias \"$alias\" to unknown country code \"$real\"\n";
1N/A# old name of function for backwards compatibility 1N/A#======================================================================= 1N/A# change the official name for a country, eg: 1N/A# gb => 'Great Britain' 1N/A# rather than the standard 'United Kingdom'. The original is retained 1N/A# as an alias, but the new name will be returned if you lookup the 1N/A#======================================================================= 1N/A carp "rename_country(): unknown country code \"$code\"\n";
1N/A#======================================================================= 1N/A# given a country code in an unknown codeset, return the codeset 1N/A# it is from, or undef. 1N/A#======================================================================= 1N/A#======================================================================= 1N/A# initialisation code - stuff the DATA into the ALPHA2 hash 1N/A#=======================================================================