Cpan-Mirrors

CPAN::Mirrors(3p) Perl Programmers Reference Guide CPAN::Mirrors(3p)

Cpan-Mirrors

CPAN::Mirrors(3p) Perl Programmers Reference Guide CPAN::Mirrors(3p) # CPAN::Mirrors(3p) Perl Programmers Reference Guide CPAN::Mirrors(3p) NNAAMMEE # CPAN::Mirrors - Get CPAN mirror information and select a fast one SSYYNNOOPPSSIISS # use CPAN::Mirrors; my $mirrors = CPAN::Mirrors->new( $mirrored_by_file ); my $seen = {}; my $best_continent = $mirrors->find_best_continents( { seen => $seen } ); my @mirrors = $mirrors->get_mirrors_by_continents( $best_continent ); my $callback = sub { my( $m ) = @_; printf "%s = %s\n", $m->hostname, $m->rtt }; $mirrors->get_mirrors_timings( \@mirrors, $seen, $callback, %args ); @mirrors = sort { $a->rtt <=> $b->rtt } @mirrors; print "Best mirrors are ", map( { $_->rtt } @mirrors[0. ...