NAME
Geo::Location::IP::Record::Continent - Continent details
VERSION
version 0.004
SYNOPSIS
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
$continent
=
$city_model
->continent;
};
DESCRIPTION
This class contains details about the continent associated with an IP address.
All fields may be undefined.
SUBROUTINES/METHODS
new
my
$continent
= Geo::Location::IP::Record::Continent->new(
names
=> {
de
=>
'Europa'
,
en
=>
'Europe'
,
'zh-CN'
=>
'欧洲'
,
},
geoname_id
=> 6255148,
code
=>
'EU'
,
locales
=> [
'zh-CN'
,
'en'
],
);
Creates a new continent record.
geoname_id
my
$geoname_id
=
$continent
->geoname_id;
Returns the continent's GeoNames identifier as a number.
code
my
$code
=
$continent
->code;
Returns a two-letter continent code.
Valid continent codes are:
AF - Africa
AN - Antarctica
AS - Asia
EU - Europe
NA - North America
OC - Oceania
SA - South America
name
my
$name
=
$continent
->name;
Returns the continent's name in the chosen language.
names
my
%names
= %{
$continent
->names};
Returns a hash reference that maps locale codes to localized names.
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.