* guix/import/cpan.scm (module->dist-name): Fetch the field of interest.
(cpan-fetch): Accept release name rather than module name.
(fix-source-url): Rename to ...
(cpan-source-url): ... this. Take metadata as parameter.
(package->upstream-name, cpan-version, cpan-package?, latest-release):
New procedures.
(cpan-module->sexp): Use cpan-version and cpan-source-url.
(%cpan-updater): New variable.
* guix/scripts/refresh.scm (%updaters): Add %CPAN-UPDATER.
* guix/import/cpan.scm (fix-source-url): New procedure.
(cpan-module->sexp): Use it to construct our source-url.
* tests/cpan.scm: Add tests for fix-source-url.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Modules may be removed from Perl's core, so we must check for a removal
version.
* guix/import/cpan.scm (cpan-module->sexp)[core-module?]: Also check
version upper bound.
Fixes compilation failures in 'guix pull'.
* guix/import/cpan.scm (%corelist): Change it to a promise by wrapping it with
'delay'.
(cpan-module->sexp): Adapt uses of %corelist by wrapping with 'force'.