Forum: Cfengine Help
Subject: Re: Questions about the reference manual
Author: mwlarsen
Link to topic: https://cfengine.com/forum/read.php?3,18107,18226#msg-18226

neilhwatson Wrote:
-------------------------------------------------------
> In my opinion all sysadmins should have some basic
> programming theory.

Oh, I have some programming theory, Neil, it's just highly dated.  :-)  My 
interest in it ended when I graduated from college and went back to being a 
hardware tech.

 > If you are writing shell
> scripts and perl code without the theory then I
> fear for your code and the hosts it runs on.

My code is safe, documented line-by-line, and vetted by other sysadmins. It's 
just linear and monolithic vs. modular and reusable - think "top-down" method. 
It may not be efficient, but it works, and anyone can read it and understand 
what it's doing.
 
> depth_search => urecurse("inf");
> 
> means, for depth search use body part (think
> subroutine call) urecurse and pass the string
> 'inf' to it.
> 
> body depth_search urecurse(d) {
> 
> means, depth search body part who's name is
> urecurse and assign the passed value to the scalar
> 'd'.  Think of perl's shift.

Now that I can understand. Thanks.

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

Reply via email to