Locale::Country(3perl)

Locale::Country3perl

Module for dealing with country code sets

Usage

   use Locale::Country;
   $name = code2country(CODE);
   $code = country2code(NAME);
   @codes   = all_country_codes();
   @names   = all_country_names();

Overview

This module provides access to country code sets.

Please refer to the Locale::Codes::Types document for a description of the code sets available.

Most of the routines take an optional additional argument which specifies the code set to use. The code set can be specified using the name of a code set, or the perl constant specified in the above document. If not specified, the default code set will be used.

Routines

All routines in this module call the appropriate method in the Locale::Codes module, using an object of type: country Please refer to the documentation of the Locale::Codes module for details about each function.

The following functions are exported automatically:

code2country(CODE [,CODESET] [,'retired'])

See code2name in Locale::Codes

country2code(NAME [,CODESET] [,'retired'])

See name2code in Locale::Codes

country_code2code(CODE ,CODESET ,CODESET2)

See code2code in Locale::Codes

all_country_codes([CODESET] [,'retired'])

See all_codes in Locale::Codes

all_country_names([CODESET] [,'retired'])

See all_names in Locale::Codes

The following functions are not exported and must be called fully qualified with the package name:

Locale::Country::show_errors(FLAG)

By default, invalid input will produce empty results, but no errors. By passing in a non-zero value of FLAG, errors will be produced.

See show_errors in Locale::Codes but note that the default for the non-OO modules are to NOT produce errors.

Locale::Country::rename_country(CODE ,NEW_NAME [,CODESET])

See rename_code in Locale::Codes

Locale::Country::add_country(CODE ,NAME [,CODESET])

See add_code in Locale::Codes

Locale::Country::delete_country(CODE [,CODESET])

See delete_code in Locale::Codes

Locale::Country::add_country_alias(NAME ,NEW_NAME)

See add_alias in Locale::Codes

Locale::Country::delete_country_alias(NAME)

See delete_alias in Locale::Codes

Locale::Country::rename_country_code(CODE ,NEW_CODE [,CODESET])

See replace_code in Locale::Codes

Locale::Country::add_country_code_alias(CODE ,NEW_CODE [,CODESET])

See add_code_alias in Locale::Codes

Locale::Country::delete_country_code_alias(CODE [,CODESET])

See delete_code_alias in Locale::Codes

Releases

8 releases since Debian 3.1 (Sarge); the text changed 7 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. 8
  7. 9
  8. 10

Author

See Locale::Codes for full author history.

Currently maintained by Sullivan Beck ([email protected]).

From perl-doc 5.28.1-6+deb10u1 in Debian 10 (Buster). Parsed by carta from the page's man source.