Geo::Mirror(3pm)

Geo::Mirror3pm

Find closest mirror

Usage

  use Geo::Mirror;
  my $gm = Geo::Mirror->new(mirror_file => '/path/to/mirrors.txt');
  my $mirror = $gm->closest_mirror_by_country('us', $freshness);       # $freshness optional, see description below
  my $mirror = $gm->closest_mirror_by_addr('24.24.24.24', $freshness); # $freshness optional, see description below

Overview

This module finds the closest mirror for an IP address. It uses Geo::IP to identify the country that the IP address originated from. If the country is not represented in the mirror list, then it finds the closest country using a latitude/longitude table.

The mirror file should be a space separate list of URL, Country, and mirror freshness. The mirror freshness is optional and can be used by user request a mirror with a minimum freshness.

Releases

4 releases since Debian 5.0 (Lenny); the text changed 3 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8

Author

Copyright (c) 2004, MaxMind LLC, [email protected]

All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

From libgeo-ip-perl 1.45-1 in Debian 8 (Jessie). Parsed by carta from the page's man source.