- SEE ALSO
- LICENSE AND COPYRIGHT
Locale::BR - Identify Brazilian states by two-letter codes and vice-versa
use Locale::BR qw( :all ); my $state = code2state('RJ'); # 'Rio de Janeiro' my $code = state2code('Amapá'); # 'AM' my @states = all_state_names(); my @codes = all_state_codes();
This modules exports nothing by default, so you'll have to use the ':all' export tag in order to import the subroutines to your namespace. Or you can explicitly name any of the following subroutines:
Takes a state code and returns a string containing the name of the state. If the code is not a valid state code, returns
This subroutine is case insensitive. For instance, 'mg', 'Mg', 'MG' and even 'mG' will all return 'Minas Gerais'.
Takes a state name and returns a string containing its respective code. If the name is not a valid state name, returns
This subroutine is case insensitive and understands state names with and without accentuation. For instance, 'Amapá', 'amapá', 'Amapa' and 'amapa' will all return 'AP'.
Returns an alphabetically ordered list of all Brazilian state names.
Returns an alphabetically ordered list of all Brazilian state codes.
Breno G. de Oliveira,
<garu at cpan.org>
Please report any bugs or feature requests to
bug-locale-br at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Locale-BR. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
Copyright 2009 Breno G. de Oliveira.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.