my $cc = new NCC::CountryCode();
my $cc_hash = $cc->getCCs();
print ($cc->isCC('NL')) ? "exists" : "non-existing";
DESCRIPTIONThis module provides class and several methods to simplify mapping between country names and country codes, as they assigned in the ISO3166.
The CC2Country() method maps country code to the corresponding country name or empty string, if it doesn\'t exist.
The Country2CC() tries to map passed country name into country code. As the spelling of the name may vary, this function tries to find all possible matches for passed name. In array context method returns hash of country codes and names, in scalar - a string, containing all possible country codes and corresponding country names.
The isCC() method verifies, that passed country code is a legal one and returns it in upper case. Otherwise it returns empty string.
The getCCs() method returns the reference to the internal hash, that contains all the country codes with corresponding them country names.