Yesterday I started to improve a couple of watch files in our
repository:
* first I changed all URLs pointing to
http://mirrors.kernel.org/cpan/modules/by-module/ ... because of
the timeouts this server has
* then I changed the URLs containing /authors/ because they don't
match anymore if the maintainer of a module changes
For all changed URLs I've used the dist-based scheme, which is also
used by current dh-make-perl:
http://search.cpan.org/dist/Module-Name/ .*/Module-Name-([[:digit:]].*)\.tar\.gz
At that point I saw that there are quite a lot of watch files
referring to URLs with /by-authors/, and I decided to spend my time
on scripting the changes instead of manually fixing them all :)
What I've done (with the help of dam, Tincho and SquOnk on irc) is to
extend the packagecheck script (in svn under /scripts/qa); the new
test kicks in if the URL in debian/watch doesn't match
search.cpan.org/dist and then changes any cpan-related URL to the
above mentioned scheme. This affects /by-module/ URLs as well. [0]