Geo-IP-RU-IpGeoBase

 view release on metacpan or  search on metacpan

bin/ip-geo-base-ru  view on Meta::CPAN

my $api = Geo::IP::RU::IpGeoBase->new(
    db => \%db,
);
if ( $opt{'create'} ) {
    print "Going to create a table\n" if $opt{'verbose'};
    $api->create_table;
}

update_ip_geo_base();

sub update_ip_geo_base{

    my ($blocks_file, $cities_file) = fetch();

    my %city_info;
    $api->process_file(
        $cities_file,
        fields   => [qw(city_id city region federal_district latitude longitude)],
        callback => sub {
            my $rec = shift;
            $city_info{ delete $rec->{'city_id'} } = $rec;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.542 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )