NAME
Telephone::Lookup::Americom - Lookup area, exchange, service provider, etc. information from Americom.
SYNOPSIS
use Telephone::Lookup::Americom;
my $am = Telephone::Lookup::Americom->new();
my @res = $am->lookup('212-555-1212');
DESCRIPTION
This module uses Americom Area Decoder (http://decoder.americom.com/) to lookup information about a phone number. It parses the return form and returns a list of hash refs, one for each record found.
my @res = $am->lookup('212'); ## lookup only area code
my @res = $am->lookup('212-555'); ## area code and exchange
my @res = $am->lookup('212-555-1212'); ## or full phone number
## The form also seems to accpept numbers of the form '2125551212' and '(212) 555-1212'.
## The module can return two datatypes:
for my $record (@res) {
if ($record->{_type} eq 'AREA_CODE'} {
# The fields are:
# $record->{'area_code', 'location', 'created_on'}
}
elsif ($record->{_type} eq 'EXCHANGE_CODE') {
# The fields are: exchange_location, exchange_type, exchange_owner, created_on
}
}
EXPORT
None by default.