Forum: CFEngine Help
Subject: Re: About "new" templates correct usage or limitations
Author: mark
Link to topic: https://cfengine.com/forum/read.php?3,26723,26774#msg-26774

Hi, just a brief response from me. The idea of the begin end blocks is to allow 
iteration over sections. It is not to encapsulate the whole file and would have 
no effect. So if you limit the begin-end to only sections that should be 
iterated you will perceive fewer limits.

There are many reasons for limits, some are like safety nets (editfilesize 
etc). In this case it has to do with the variable expansion algorithm trying to 
prevent out-of-control behaviour. It is not easy to decouple these things at 
the moment.

If we allowed arbitrary size allocations, someone could mistakenly kill their 
system with a typo. So sarcasm aside, we will have to think about best 
practices of use, and perhaps think about the maximum sizes again. CFEngine is 
designed to work on systems with even small memory footprints. That's the 
thinking. Maybe it needs re-evaluating.

Think of begin-end like a mutex: you are supposed to lock only the absolute 
minimum critical section...

M

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to