geo::ip模块,这个模块连给的样子都报错,具体如下

代码

use Geo::IP;
>
>
> my $gi = Geo::IP->open("/opt/www/my/cgi-bin/GeoLiteCity.dat",
> GEOIP_STANDARD);
> my $r = $gi->record_by_name("123.125.50.22");
> print   $record->country_code,
>         $record->country_code3,
>         $record->country_name,
>         $record->region,
>         $record->region_name,
>         $record->city,
>         $record->postal_code,
>         $record->latitude,
>         $record->longitude;
>


错误提示:

Can't call method "country_code" on an undefined value at getcity.pl line
18.


-- 
…………………………………………
              Ericzhao

Email:   [email protected]
MSN:    [email protected]
BLOG:   share82.freebsder.info

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。
 要在此论坛发帖,请发电子邮件到 [email protected]
 要退订此论坛,请发邮件至 [email protected]
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

回复