Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Geo-IP CPAN distribution.

Report information
The Basics
Id: 16336
Status: rejected
Priority: 0/
Queue: Geo-IP

People
Owner: BORISZ [...] cpan.org
Requestors: robbie.bow [...] spira.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.27
Fixed in: (no value)



Subject: country_code_by_addr will cause fatal error if running on localhost
Running v1.27 on WinXP with ActivePerl 5.8.7, the country_code_by_addr method appears to cause a fatal error if I pass it the IP Address "127.0.0.1". For instance: use Geo::IP; my $gi = Geo::IP->new(GEOIP_STANDARD) or die; my $country = $gi->country_code_by_addr('127.0.0.1') or die; Returns "Died at tmp.pl line 3." A relatively minor bug as most users won't be running their browser on the same machine as the web server, but mildly annoying if you're running a local copy of a site for development purposes.
Hi, thats not a bug. Every computer in all countries has a loopback interface. For that reason no country is found. The same is true for all private networks. The fatal error is triggered from your die and not country_code_by_addr. -- Boris