use CPAN;
CPAN::HandleConfig->load;
print for @{ $CPAN::Config->{urllist} }
[/QUOTE]
Hmm, this is exactly the type of mess I would like to avoid. Maybe
calling CPAN::Config (?) directly would be more approriate? Anyone
with an experience?
CPAN::Config->load is now CPAN::HandleConfig->load. There really isn't
any other way of doing this. If you look inside CPAN.pm you'll see that
the point of load() is to create $CPAN::Config, a hash reference, and
everything after that is a hash access.
I just hacked the cpan script to allow someone to load their own
config, but that doesn't do much for you because it would be an
external process. One of the features I've got on my todo list is a
switch to simply fetch a distro (but not unpack it, etc).
Adam and Andreas recently (or are close to) added a mirrors list to
PAUSE so you could download a known file and have easy access to
various mirrors (easier than MIRRORED>BY, anyway). The Mirror::*
concept is to be able to quickly find the fastest mirror by pinging a
bunch of them.
http://search.cpan.org/dist/Mirror-YAML
You could also use that list to present to the user. Only recently
tested good mirrors should be in there.