NAME
Geo::Location::IP::Record::Postal - Postal details
VERSION
version 0.002
SYNOPSIS
use Geo::Location::IP::Database::Reader;
my $reader = Geo::Location::IP::Database::Reader->new(
file => '/path/to/City.mmdb',
);
eval {
my $city_model = $reader->city(ip => '1.2.3.4');
my $postal = $city_model->postal;
};
DESCRIPTION
This class contains the postal details associated with an IP address.
All fields may be undefined.
SUBROUTINES/METHODS
new
my $postal = Geo::Location::IP::Record::Postal->new(
code => 'SW1A 0AA'.
confidence => 100,
);
Creates a new postal record.
code
my $code = $postal->code;
Returns the location's postal code as a string.
confidence
my $confidence = $postal->confidence;
Returns a value in the range from 0 to 100 that indicates the confidence that the postal details are correct.
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.