NAME
Geo::Location::IP::Address - IP address 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 $ip_address = $asn_model->ip_address;
};
DESCRIPTION
This class contains details about an IP address in a geolocation database.
SUBROUTINES/METHODS
new
my $ip_address = Geo::Location::IP::Address->new(
address => '1.2.3.4',
network => $network,
);
Creates an IP address object.
address
my $address = $ip_address->address;
Returns the address as a string.
Objects also stringify to their address.
network
my $network = $ip_address->network;
Returns the network of the IP address as a Geo::Location::IP::Network object.
version
my $version = $network->version;
Returns 4 or 6.
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.