The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Locale::Country::SubCountry::Base - Country names in English, and subcountry names in native scripts

Synopsis

See Locale::Country::SubCountry.

Description

Locale::Country::SubCountry provides subcountry names in their native scripts.

This module serves as a parent for various other modules.

Use Locale::Country::SubCountry::Database::Base for apps.

Methods

all_countries()

Returns an arrayref, 1 element per country, where each element is a hashref with these keys:

o id

Unique identifier for the country. Countries are numbered from 1 up.

o address_format

A string showing how to format an address in this country. Only set for some countries.

Split the string on '#' characters, to produce a format of N lines.

Replace the tokens ':X' with the corresponding data (if available).

o code2

The ISO3166-1 2-letter code for the country.

o code3

The ISO3166-1 3-letter code for the country.

o name

The name of the country, in English.

Note: A copy of the file data/countries.csv is stored below (under __DATA__), so that that file is not needed at run-time.

all_subcountries()

Returns an arrayref, 1 element per subcountry, where each element is a hashref with these keys:

o id

Unique identifier for the subcountry. Subcountries are numbered from 1 up.

o country_id

The id of the country (starts from 1).

o code

The ISO3166-2 1 .. 5-letter code for the country.

o name

The name of the subcountry, in the country's native script.

Note: A copy of the file data/sub_countries.csv is stored below (under __DATA__), so that that file is not needed at run-time.

_init()

For use by subclasses.

Sets default values for object attributes.

new()

For use by subclasses.

Support

Email the author, or log a bug on RT:

https://rt.cpan.org/Public/Dist/Display.html?Name=Locale::Country::SubCountry.

Author

Locale::Country::SubCountry was written by Ron Savage <ron@savage.net.au> in 2011.

Home page: http://savage.net.au/index.html.

Copyright

Australian copyright (c) 2011, Ron Savage.

        All Programs of mine are 'OSI Certified Open Source Software';
        you can redistribute them and/or modify them under the terms of
        The Artistic License, a copy of which is available at:
        http://www.opensource.org/licenses/index.html