The road to better programming: Chapter 7. Top-level control flow
The control flow
The cfperl control flow is summarized briefly in the POD section of cfperl itself.
Listing 6. cfperl control flow documentation
|
The functions that handle these steps are:
- Top-level parser:
parse_line()
- Import:
load_file()
- Control and groups:
dispatch()
- All other sections:
dispatch()
All these steps except the top-level parsing are done inside cfrun()
. In
effect, cfrun()
is the actual interpreter, whereas parse_line()
is the
preparation phase that sorts out sections and imports. Imports have to be
done before interpretation, because their contents may affect interpretation.
Note that the documentation of the control flow is inside the program itself! It is stated in fairly simple terms, which should be understandable to someone experienced with cfengine.
View The road to better programming: Chapter 7. Top-level control flow Discussion
Page: 1 2 3 4 5 Next Page: Command-line switches and other configuration optionsFirst published by IBM developerWorks