CPAN::Mirror::Finder - Find a locally-configured CPAN mirror
use CPAN::Mirror::Finder; my $finder = CPAN::Mirror::Finder->new; my @mirrors = $finder->find_all_mirrors; my @cpanmini_mirrors = $finder->find_cpanmini_mirrors; my @cpan_mirrors = $finder->find_cpan_mirrors; my @cpanplus_mirrors = $finder->find_cpanplus_mirrors;
This modules makes it easy to find a locally-configured CPAN mirror. There are many ways to have a CPAN mirror. The most explicit is to use CPAN::Mini with a configuration file to have an entirely local CPAN mirror.
Also CPAN.pm can be configured with details of CPAN mirrors.
Also CPANPLUS can be configured with details of CPAN mirrors. This also contains sensible defaults if the user has not configured anything.
All methods return URI objects.
Returns a combination of all the ways of finding locally-configured CPAN mirror:
my @mirrors = $finder->find_mirror; # returns all the following
Returns a local CPAN::Mini mirror, if any:
my @cpanmini_mirrors = $finder->find_cpanmini_mirrors;
Returns the mirrors configured by CPAN.pm:
my @cpan_mirrors = $finder->find_cpan_mirrors;
Returns the mirrors configured by CPANPLUS:
my @cpanplus_mirrors = $finder->find_cpanplus_mirrors;
Leon Brocard <acme@astray.com>.
Copyright (C) 2011, Leon Brocard
This module is free software; you can redistribute it or modify it under the same terms as Perl itself.
To install CPAN::Mirror::Finder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::Mirror::Finder
CPAN shell
perl -MCPAN -e shell install CPAN::Mirror::Finder
For more information on module installation, please visit the detailed CPAN module installation guide.