help-cfengine
[Top][All Lists]
Advanced

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

Re: Editfiles Considered Harmful


From: Ted Zlatanov
Subject: Re: Editfiles Considered Harmful
Date: Thu, 04 Dec 2003 15:40:52 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v)

On Thu, 4 Dec 2003, chip@trdlnk.com wrote:

> I think a lot of what you are talking about could be accomodated if
> editfiles got away from lines a little bit, and embraced arbitrary
> delimiters rather than the goode olde \n.  Here's a disposable
> sugegstion:
> 
> "AppendIfNoSuchBlock", "Delete BlocksContaining", perhaps?  If we
> replaced (or augmented) all the 'Line' commands with 'Block', where
> the sole difference is that a Block is begun/ended with a defined
> delimiter (kinda like SplitOn, but regex instead of a char) instead
> of always '\n'.

I think that's an useful improvement, but a mechanical one.  That's
not what I meant.  The change I suggested is more of a lexical
improvement, because you're no longer dealing with "replace line/block
AAA BBB .* with AAA BBB CCC" but now you're asking for "set section
AAA, option BBB to CCC."  So you deal with sections and options, which
is (IMO) easier to understand, easier to use, and more convergent.
On the other hand, such niceties require cfengine to understand the
structure of configuration files, that's why I mentioned
"configuration styles" that may have to go into modules.

Ted




reply via email to

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