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

Number::Phone::BR::Areas

DESCRIPTION

Utilities to handle local areas (prefixes and names) for Brazilian telephone numbers.

METHODS

All of these methods are exported upon request:

mobile_phone_digits_by_area($code)

Arguments:

  • $code: the code of the area (DDD)

Return value:

  • Integer 8 or 9, according to the area, based on current date.

Brazil mobile phones are migrating to 9 digits. Not all areas have migrated, but they will by the end of 2016. This function returns whether a given area has 8 or 9 digits for its mobile phone numbers.

code2name($code)

Arguments:

  • $code: the code of the area (DDD)

Return value:

  • The name of the area.

Returns the name of the region of a given code.

AUTHOR

André Walker <andre@andrewalker.net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by André Walker.

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