1.1. Directive syntax
Configuration directives are normally specified with the directive as the first word on the line, with its value or values following. Capitalization of the directive name is not significant. Leading and trailing whitespace is stripped from the line.
Including files in directives
Additional files may be called with an include file notation like this:
Files included from interchange.cfg are relative to the Interchange software directory. Files included from catalog.cfg are relative to the catalog directory.
A "here document" can be used to spread directive values over several lines, with the usual Perl <<MARKER syntax. No semicolon is used to terminate the marker. The closing marker must be the only thing on the line. No leading or trailing characters are allowed, not even whitespace. Here is a hypothetical directive using a here document:
DirectiveName <<EOD setting1 setting2 setting3 EOD
That is equivalent to:
DirectiveName setting1 setting2 setting3
Include single setting from file
Value can be pulled from a file with <file:
Variable MYSTUFF <file
This works well for includes that must be of the highest possible performance. They can be simply placed in a page with __VARIABLE__.
Other configuration files can be included in the current one. For example, common settings can be set in one file:
Or all files in one directory:
ifdef and ifndef
ifdef/endif and ifndef/endif pairs can be used:
Variable ORDERS_TO email_address ifdef ORDERS_TO ParseVariables Yes MailOrderTo __ORDERS_TO__ ParseVariables No endif ifdef ORDERS_TO =~ /foo.com/ # Send all orders at foo.com to one place now # Set ORDERS_TO to stop default setting Variable ORDERS_TO 1 MailOrderTo firstname.lastname@example.org endif ifdef ORDERS_TO eq 'email@example.com' # Better change to something else, set ORDERS_TO to stop default Variable ORDERS_TO 1 MailOrderTo firstname.lastname@example.org endif ifndef ORDERS_TO #Needs to go somewhere.... MailOrderTo webmaster@localhost endif