import: cpan: Use tls to query api.metacpan.org.

* guix/import/cpan.scm (module->dist-name, cpan-fetch-module): Use tls
for api.metacpan.org.

Signed-off-by: Eric Bavier <bavier@member.fsf.org>
This commit is contained in:
ng0 2016-08-30 12:57:47 +00:00 committed by Eric Bavier
parent 6a540995fb
commit 7a62263ee5
No known key found for this signature in database
GPG Key ID: 1EBBD204781F962C
1 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@
"Return the base distribution module for a given module. E.g. the 'ok'
module is distributed with 'Test::Simple', so (module->dist-name \"ok\") would
return \"Test-Simple\""
(assoc-ref (json-fetch (string-append "http://api.metacpan.org/module/"
(assoc-ref (json-fetch (string-append "https://api.metacpan.org/module/"
module))
"distribution"))
@ -91,7 +91,7 @@ return \"Test-Simple\""
"Return an alist representation of the CPAN metadata for the perl module MODULE,
or #f on failure. MODULE should be e.g. \"Test::Script\""
;; This API always returns the latest release of the module.
(json-fetch (string-append "http://api.metacpan.org/release/"
(json-fetch (string-append "https://api.metacpan.org/release/"
;; XXX: The 'release' api requires the "release"
;; name of the package. This substitution seems
;; reasonably consistent across packages.