maxmind / GeoIP2-perl

Perl API for MaxMind's GeoIP2 web services and databases
https://metacpan.org/release/GeoIP2/
Other
18 stars 11 forks source link

Missing represented_country method on Country object #76

Open DoubleBB opened 4 years ago

DoubleBB commented 4 years ago

$VERSION = '2.006002';

The represented_country method of Country object is missing due to a bug in Country.pm

On line 22 of Country.pm in directory GeoIP2/Model/ :

__PACKAGE__->_define_attributes_for_keys(
    qw( continent country maxmind registered_country traits ));

But it should contain represented_country also:

__PACKAGE__->_define_attributes_for_keys(
    qw( continent country maxmind registered_country traits represented_country));

Fix: add this to the qw() list. I have tried this fix and it works.