NAME

Locale::India - ISO 3166-2 defines codes for identifying the principal subdivisions (e.g., provinces or states) of all countries coded in ISO 3166-1. This module is used for state and union territory identification in the India and vice versa.

SYNOPSIS

 use Locale::India;

 my $u = Locale::India->new;

 my $state = $u->{code2state}{$code};
 my $code  = $u->{state2code}{$state};
 my $ut = $u->{code2ut}{$code};
 my $ut_code = $u->{ut2code}{$ut};

 my @state = $u->get_all_state_names;
 my @code  = $u->get_all_state_codes;
 my @ut = $u->get_all_ut_names;
 my $ut_code = $u->get_all_ut_codes;

ABSTRACT

Map for India state and union territory codes to names and vice versa.

DESCRIPTION

MAPPING

$self->{code2state}

This is a hashref which has state code names as the key and the long state name as the value.

$self->{state2code}

This is a hashref which has the long state names the key and the state code name as the value.

$self->{code2ut}

This is a hashref which has union territory code names as the key and the long union territory name as the value.

$self->{ut2code}

This is a hashref which has the long union territory names the key and the union territory code name as the value.

DUMPING

$self->get_all_state_names

Returns an array (not arrayref) of all state names in alphabetical form

$self->get_all_state_codes

Returns an array (not arrayref) of all state codes in alphabetical form.

$self->get_all_ut_names

Returns an array (not arrayref) of all union territory names in alphabetical form

$self->get_all_ut_codes

Returns an array (not arrayref) of all union territory codes in alphabetical form.

KNOWN BUGS AND LIMITATIONS

  • The state and union territory names is returned in uc() format.

  • neither hash is strict, though they should be.

SEE ALSO

Locale::Country

Locale::Country

Abbreviations

http://www.iso.org/iso/home/standards/country_codes/updates_on_iso_3166.htm?show=tab3

Online file with the state and union territory codes for the India and its possessions.

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Manoj Shekhawat.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

License: GPL, Artistic, available in the Debian Linux Distribution at /usr/share/common-licenses/{GPL,Artistic}

AUTHOR

Manoj Shekhawat, <mshekhawa@cpan.org>