Geo::Mirror - Find closest Mirror
use Geo::Mirror; my $gm = Geo::Mirror->new(mirror_file => '/path/to/mirrors.txt'); my $mirror = $gm->closest_mirror_by_country('us'); my $mirror = $gm->closest_mirror_by_addr('65.15.30.247');
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.
Copyright (c) 2002, T.J. Mather, tjmather@tjmather.com, New York, NY, USA
All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Geo::IP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::IP
CPAN shell
perl -MCPAN -e shell install Geo::IP
For more information on module installation, please visit the detailed CPAN module installation guide.