The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Locale::Geocode::Territory

DESCRIPTION

Locale::Geocode::Territory represents an individual country or territory as listed in ISO-3166-1. This class provides methods for returning information about the territory and any administrative divisions therein.

To be listed in ISO-3166-1, a country or territory must be listed in the United Nations Terminology Bulletin Country Names or Country and Region Codes for Statistical Use of the UN Statistics Division. In order for a country or territory to be listed in the Country Names bulletin, one of the following must be true of the territory:

  - is a United Nations member state a member 
  - is a member of any of the UN specialized agencies
  - a party to the Statute of the International Court of Justice

SYNOPSIS

 my $lct    = new Locale::Geocode::Territory 'US';

 # lookup a subdivision of US
 my $lcd    = $lct->lookup('TN');

 # retrieve ISO-3166-2 information for US-TN
 my $name   = $lcd->name;   # Tennessee
 my $code   = $lcd->code;   # TN

 # returns an array of Locale::Geocode::Division
 # objects representing all divisions of US
 my @divs   = $lct->divisions;

SOURCES

 Wikipedia - http://en.wikipedia.org/wiki/ISO_3166
 ISO 3166-1 - http://www.statoids.com/wab.html
 ISO 3166-2 - Locale::SubCountry

METHODS

new
lg
lookup
lookup_by_index
name
num
alpha2
alpha3
fips
has_notes
num_notes
notes
note
divisions
num_divisions

AUTHOR

 Mike Eldridge <diz@cpan.org>

CREDITS

 Kim Ryan

SEE ALSO

 L<Locale::Geocode>
 L<Locale::SubCountry>
 L<Geography::Countries>
 L<Geography::Country>