--On Saturday, April 09, 2005 6:54 AM -0700 Jim Trocki <[EMAIL PROTECTED]> wrote:

I don't think thats his problem.  An empty period definition is valid,
it  matches always.  Mon handles this correctly.

oh. that's busted. i never realized that was the case, nor intended it to be so. just reviewed the pod page for Time::Period, and i see it does say mention that a valid period string is whitespace, but it doesn't say what it means. from testing the code it does return true when you give it an empty period string. i'm inclined to make mon treat the empty string as an error, since its meaning is ambiguous according to the documentation, and on principle.


In the documentation for Time::Period, right after it says whitespace or the string 'none' are legal it says:


If the period is blank, then any time period is assumed because the
time period has not been restricted.  In that case, inPeriod returns 1.
If the period is "none", then no time period applies and inPeriod
returns 0.


So this seems like documented behavior to me. Though "none" doesn't really make sense to ever use. I suppose it would be useful as a way to temporarily disable a period, without deleting all the contents. But it seems useful to be able to have multiple named periods that always match by doing:


 period page_first:
 ...
 period page_second:
 ...
 period email_log:
 ...


Not that I'm doing that, since my periods are all programaticaly generated. But if you're building a config file by hand having to specify a period definition for something you want to always match seems silly.


-David

David Nolan                    <*>                    [EMAIL PROTECTED]
curses: May you be forced to grep the termcap of an unclean yacc while
     a herd of rogue emacs fsck your troff and vgrind your pathalias!

_______________________________________________
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to