NAME

Geo::Location::IP::Model::ISP - ISP details

VERSION

version 0.002

SYNOPSIS

use Geo::Location::IP::Database::Reader;
my $reader = Geo::Location::IP::Database::Reader->new(
  file => '/path/to/ISP.mmdb',
);
eval {
  my $isp_model = $reader->isp(ip => '1.2.3.4');
  my $isp       = $isp_model->isp;
  printf "%s\n", $isp;
};

DESCRIPTION

This class contains details about an Internet Service Provider.

SUBROUTINES/METHODS

new

my $isp_model = Geo::Location::IP::Model::ISP->new(
  autonomous_system_number       => 12345,
  autonomous_system_organization => 'Acme Corporation',
  ip_address                     => $ip_address,
  isp                            => 'Acme Telecom',
  organization                   => 'Acme Mobile',
);

Creates a new object with data from an IP address query in an ISP database.

All fields may contain undefined values.

autonomous_system_number

my $as_number = $isp_model->autonomous_system_number;

Returns the Autonomous System number associated with the IP address the data is for.

autonomous_system_organization

my $as_organization = $isp_model->autonomous_system_organization;

Returns the name of the organization associated with the Autonomous System number.

ip_address

my $ip_address = $isp_model->ip_address;

Returns the IP address the data is for as a Geo::Location::IP::Address object.

isp

my $isp = $isp_model->isp;

Returns the name of the ISP associated with the IP address.

organization

my $organization = $traits->organization;

Returns the name of the organization associated with the IP address.

DIAGNOSTICS

None.

CONFIGURATION AND ENVIRONMENT

None.

DEPENDENCIES

None.

INCOMPATIBILITIES

None.

BUGS AND LIMITATIONS

None known.

AUTHOR

Andreas Vögele <voegelas@cpan.org>

LICENSE AND COPYRIGHT

Copyright (C) 2025 Andreas Vögele

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