Subject: | search.cpan.org cache |
I think it would be nice if cpan2rpm would cache previously successful distribution searches from cpan. Not only would it be kinder to the poor search.cpan.org server, but it could tremendously increase the speed of cpan2rpm builds of modules that have already been resolved to a URL before. Plus, the client network may go down at times or search.cpan.org may be sluggish. It would be wonderful to be able to build rpms without wasting the network.
This can possibly be implemented with a symlink:
Example:
cpan2rpm Net::Ping
1) Check readlink("SOURCES/Net::Ping")
2) If it's there use it, otherwise slap on search.cpan.org to obtain the URL
3) If found, create symlink("http://www.cpan.org/authors/id/B/BB/BBB/Net-Ping-2.28.tar.gz","SOURCES/Net::Ping")
If the --force option were supplied, it could bypass the readlink check and build a fresh symlink.