Subject: [PATCH 05/14] import: cpan: Use PARSE-COMMAND-LINE for options.

From: Sarah Morgensen <[email-masked]>
Date: Thu, 29 Jul 2021 20:55:01 -0700

guix/scripts/import/cpan.scm (guix-import-cpan)[parse-options]: Use
PARSE-COMMAND-LINE instead of ARGS-FOLD*.
---
 guix/scripts/import/cpan.scm | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/guix/scripts/import/cpan.scm b/guix/scripts/import/cpan.scm
index 77ffe1f38e..bdf5a1e423 100644
--- a/guix/scripts/import/cpan.scm
+++ b/guix/scripts/import/cpan.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Eric Bavier <[email-masked]>
+;;; Copyright © 2021 Sarah Morgensen <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -66,12 +67,8 @@ Import and convert the CPAN package for PACKAGE-NAME.\n"))
 (define (guix-import-cpan . args)
   (define (parse-options)
     ;; Return the alist of option values.
-    (args-fold* args %options
-                (lambda (opt name arg result)
-                  (leave (G_ "~A: unrecognized option~%") name))
-                (lambda (arg result)
-                  (alist-cons 'argument arg result))
-                %default-options))
+    (parse-command-line args %options (list %default-options)
+                        #:build-options? #f))
 
   (let* ((opts (parse-options))
          (args (filter-map (match-lambda
-- 
2.31.1