NAME
Geo::Location::IP::Model::ASN - Autonomous System details
VERSION
version 0.002
SYNOPSIS
use Geo::Location::IP::Database::Reader;
my $reader = Geo::Location::IP::Database::Reader->new(
file => '/path/to/ASN.mmdb',
);
eval {
my $asn_model = $reader->asn(ip => '1.2.3.4');
my $as_number = $asn_model->autonomous_system_number;
printf "%d\n", $as_number;
};
DESCRIPTION
This class contains details about an Autonomous System.
An Autonomous System is a connected group of one or more IP prefixes run by one or more network operators.
SUBROUTINES/METHODS
new
my $asn_model = Geo::Location::IP::Model::ASN->new(
autonomous_system_number => 12345,
autonomous_system_organization => 'Acme Corporation',
ip_address => $ip_address,
);
Creates a new object with data from an IP address query in an ASN database.
All fields may contain undefined values.
autonomous_system_number
my $as_number = $asn_model->autonomous_system_number;
Returns the Autonomous System number associated with the IP address the data is for.
autonomous_system_organization
my $as_organization = $asn_model->autonomous_system_organization;
Returns the name of the organization associated with the Autonomous System number.
ip_address
my $ip_address = $asn_model->ip_address;
Returns the IP address the data is for as a Geo::Location::IP::Address object.
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.