bug-mcron
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-mcron] [PATCH 11/33] main: Import the modules used in one time.


From: Mathieu Lirzin
Subject: [Bug-mcron] [PATCH 11/33] main: Import the modules used in one time.
Date: Sun, 27 Sep 2015 23:00:22 +0200

* scm/mcron/main.scm: Gather module imports.
---
 scm/mcron/main.scm | 30 +++++++++---------------------
 1 file changed, 9 insertions(+), 21 deletions(-)

diff --git a/scm/mcron/main.scm b/scm/mcron/main.scm
index 53fed6d..9f22a1f 100644
--- a/scm/mcron/main.scm
+++ b/scm/mcron/main.scm
@@ -29,12 +29,16 @@
 ;; (l0ad "crontab.scm") (sic) is inlined by the makefile. All other
 ;; functionality comes through modules in .../share/guile/site/mcron/*.scm.
 
+(use-modules (ice-9 getopt-long)
+             (ice-9 rdelim)
+             (ice-9 regex)
+             (mcron config)
+             (mcron core)
+             (mcron job-specifier)
+             (mcron vixie-specification)
+             (srfi srfi-2))
 
-
-;; Pull in some constants set by the builder (via autoconf) at configuration
-;; time. Turn debugging on if indicated.
-
-(use-modules (mcron config))
+;; Turn debugging on if indicated.
 (if config-debug (begin (debug-enable 'debug)
                         (debug-enable 'backtrace)))
 
@@ -44,8 +48,6 @@
 ;; backwards for the first non-alphabetic character. This allows names like
 ;; in.cron to be accepted as an invocation of the cron command.
 
-(use-modules (ice-9 regex) (ice-9 rdelim))
-
 (define command-name (match:substring (regexp-exec (make-regexp 
"[[:alpha:]]*$")
                                                    (car (command-line)))))
 
@@ -93,8 +95,6 @@
 ;; all the others, with the --help and --version options common to all the
 ;; personalities.
 
-(use-modules (ice-9 getopt-long))
-
 (define options
   (catch
    'misc-error
@@ -234,16 +234,6 @@ reading all the information in the users' crontabs and in 
/etc/crontab.\n
       (c-set-cron-signals)))
 
 
-
-;; Define the functions available to the configuration files. While we're here,
-;; we'll get the core loaded as well.
-
-(use-modules (mcron core)
-             (mcron job-specifier)
-             (mcron vixie-specification))
-
-
-
 ;; Procedure to slurp the standard input into a string.
 
 (define (stdin->string)
@@ -349,8 +339,6 @@ reading all the information in the users' crontabs and in 
/etc/crontab.\n
 ;; operation, but we leave it to the permissions on the /var/cron/tabs 
directory
 ;; to enforce this.
 
-(use-modules (srfi srfi-2))  ;; For and-let*.
-
 (define (process-files-in-system-directory)
   (catch #t
          (lambda ()

reply via email to

[Prev in Thread] Current Thread [Next in Thread]