From: Vincent Pit Date: Sat, 6 Dec 2008 16:30:43 +0000 (+0100) Subject: The dists available in cpan/modules/by-module are only those registered in the module... X-Git-Tag: v0.04~5 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=fd9a4dd76ae879b6838e530ebcc876589de4ed09;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git The dists available in cpan/modules/by-module are only those registered in the module list, so we should actually get them from cpan/modules/by-authors/id/X/XY/XYZ --- diff --git a/lib/CPANPLUS/Dist/Gentoo.pm b/lib/CPANPLUS/Dist/Gentoo.pm index 2c8c0cf..2e87633 100644 --- a/lib/CPANPLUS/Dist/Gentoo.pm +++ b/lib/CPANPLUS/Dist/Gentoo.pm @@ -173,11 +173,12 @@ sub prepare { $stat->uri('http://search.cpan.org/dist/' . $name); - unless ($name =~ /^([^-]+)/) { - error 'Wrong distribution name -- aborting'; + unless ($author =~ /^(.)(.)/) { + error 'Wrong author name -- aborting'; return 0; } - $stat->src('mirror://cpan/modules/by-module/' . $1 . '/' . $mod->package); + $stat->src("mirror://cpan/modules/by-authors/id/$1/$1$2/$author/" + . $mod->package); $stat->license([ qw/Artistic GPL-2/ ]);