The default parser
Any cfrun atoms handed to the dispatch() function have a section attribute. The dispatch()
function will look for an appropriate parser for each atom, based on
the section. For instance, there's a specific parser for the users: section that understands commands like add_user.
In the case that there is no explicitly defined parser to handle a cfrun
atom, the default parser is invoked. The default parser does not do
anything at all -- it is only a placeholder. Cfperl was explicitly
designed so that it would supplement cfengine, so cfengine sections
such as editfiles: and files: should not be handled by cfperl at all. Thus, the default parser is invoked by dispatch():
|
|
As an amusing side note, the DEFAULT_SECTION constant has to be invoked as a function, or Perl assumes you mean the string "DEFAULT_SECTION" rather than the constant named so.
View The road to better programming: Chapter 9. The classes and default parsers Discussion
Page: 1 2 3 4 5 6 Next Page: The group section parser