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::CountryCode - DEPRECATED - Country Phone Dialing Prefixes

VERSION

version 0.03

SYNOPSIS

THIS MODULE IS DEPRECATED. Please use Number::Phone::Country instead.

use Number::Phone::CountryCode;

# retrieve object of United Kingdom codes.
my $pc = Number::Phone::CountryCode->new('GB');

print $pc->country;       # ISO 3166 code, e.g: GB
print $pc->country_code;  # country prefix
print $pc->idd_prefix;    # IDD prefix
print $pc->ndd_prefix;    # NDD prefix

# get list of supported ISO 3166 codes
my @countries = Number::Phone::CountryCode->countries;

See below for description of the country/IDD/NDD prefixes.

DESCRIPTION

This Module is Deprecated

This module is deprecated and its functionality has been integrated into Number::Phone::Country. Please use Number::Phone::Country instead.

This module provides an interface to lookup country specific dialing prefixes. These prefixes are useful when working with phone numbers from different countries. The follwing codes are available for each country:

Country Code

This is the national prefix to be used with dialing to a country from another country.

National Direct Dialing Prefix (NDD)

This is the prefix used to make a call within a country from one city to another. This prefix may not be necessary when calling another city in the same vicinity. This is followed by the city or area code for the place you are calling. For example, in the US, the NDD prefix is "1", so you must dial 1 before the area code to place a long distance call within the country.

International Direct Dialing Prefix (IDD)

This is the prefix needed to make a call from a country to another country. This is followed by the country code for the country you are calling. For example, when calling another country from the US, you must dial 011.

METHODS

new($country)

Constructs a new Number::Phone::CountryCode object. $country is the two digit ISO 3166 country code for the country you wish to look up. Returns undef if the country code did not match one of the supported countries.

country

the ISO 3166 country code for this country

country_code

The national prefix for this country

ndd_prefix

The NDD prefix for this country. Note that this might be undef if no prefix is necessary.

idd_prefix

The IDD prefix for this country. Note that this might be undef if no prefix is necessary.

countries

Returns a list of all ISO 3166 country codes supported by this module.

is_supported($country)

Returns true if the given country is supported, false otherwise. $country is a 2 character ISO 3166 country code.

SOURCE

The development version is on github at http://github.com/mschout/number-phone-countrycode and may be cloned from git://github.com/mschout/number-phone-countrycode.git

BUGS

Please report any bugs or feature requests to bug-number-phone-countrycode@rt.cpan.org or through the web interface at: http://rt.cpan.org/Public/Dist/Display.html?Name=Number-Phone-CountryCode

AUTHOR

Michael Schout <mschout@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2009 by Michael Schout <mschout@cpan.org>.

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