atheia pushed a commit to branch master
in repository guix.

commit c91b368e96de9446bab37e7fab7d7c8ba71af946
Author: Alex Sassmannshausen <[email protected]>
Date:   Sat Nov 12 17:12:53 2016 +0100

    import/cpan: Maybe coerce version to string.
    
    * guix/import/cpan.scm (cpan-module->sexp) <version>: Test if version in
      meta is string or number.  If it is number, coerce to string.
---
 guix/import/cpan.scm |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 5b7c475..d244969 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -128,7 +128,9 @@ META."
         (string-append "perl-" (string-downcase name))))
 
   (define version
-    (assoc-ref meta "version"))
+    (match (assoc-ref meta "version")
+      ((? number? vrs) (number->string vrs))
+      ((? string? vrs) vrs)))
 
   (define core-module?
     (let ((perl-version (package-version perl))

Reply via email to