I tried to use exclude_period but for some reason it wasn't working for me.

Here's the patch which solved my problem. Looks really strange, but after
splitting if () the inPeriod is evaluated correctly.
(before patch it was always -1)

I use perl 5.6.1 from Slackware 8.1.

-- 
Daniel Fenert                 --==> [EMAIL PROTECTED] <==--
--- /root/mon-0.99.2/mon        2001-09-08 15:42:05.000000000 +0200
+++ mon 2003-10-30 15:49:09.000000000 +0100
@@ -1457,11 +1457,13 @@
                    }
                    $args = $ex;
                }
-
-               elsif ($var eq "exclude_period" && inPeriod (time, $args) == -1)
-               {
-                   close (CFG);
-                   return "cf error: malformed exclude_period '$args' (the specified 
time period is not valid as per Time::Period::inPeriod), line $line_num";
+               elsif ($var eq "exclude_period")
+               {
+                   debug(1, "exclude_period args:".$args."\n");
+                   if (inPeriod (time(), $args) == -1) {
+                       close (CFG);
+                       return "cf error: malformed exclude_period '$args' (the 
specified time period is not valid as per Time::Period::inPeriod), line $line_num";
+                   }
                }

                else

_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to