Baldrick section

From CunningPlans

Jump to: navigation, search

The Baldrick section is a section in the configuration file baldrick.cfg that defines a few optional site-wide settings.

[edit] General format

The Baldrick section begins with the keyword Baldrick inside angle brackets, on a line by itself. This is followed immediately by zero or more key=value pairs. The section ends with a slash ("/") and the keyword Baldrick, inside angle brackets, on a line by itself.

 <Baldrick>
   # Comments are preceded with octothorpes.
   option1 = value1
   option2 = "a longer configuration value, enclosed in quotes.  \"Internal quotes\" may be escaped with backslashes."
 </Baldrick>

[edit] Configuration Options

Example syntax:
  • A list of values between pipe "|" characters designates alternate choices. The first choice listed is the default.
  • Anything in square brackets is optional.
  • Values in lowercase or mixed case are keywords and must appear exactly as shown.
  • Values in UPPERCASE are placeholders to be replaced with appropriate values: FILENAME, EMAIL-ADDRESS, MODULE-NAME.
  • (undefined) is a placeholder for an empty value.
random-seed-method = builtin | urandom | /dev/random | timeofday | pidtime
How to seed the random-number generator on startup. The default of "builtin" assumes that perl has already done it.
random-seed-method=builtin
site-admin-email = (undefined) | EMAIL-ADDRESS
Critical error messages are sent to this address.
site-admin-email = webmaster@example.com
timelog = (undefined) | FILENAME
If defined, the time elapsed during each run is written to the specified file. Useful for performance tuning.
timelog = /tmp/baldrick-time.log
default-template-adapter = default | TEMPLATE-ADAPTER-NAME
Defines a name ("default" by default) of a Template Adapter that will be used by the Baldrick::App for its own error messages - which might occur before module startup - or to be provided to a module that does not define a Template Adapter of its own. This points to a TemplateAdapter section by name. (Note that Modules define their own template adapters, and all output generation - except for critical startup errors - happens there instead. Thus this setting is of little importance)
default-template-adapter = MyTemplateSystem # "MyTemplateSystem" is the name of a TemplateAdapter section elsewhere in the file.
default-template-adapter-class = Baldrick
:TemplateAdapter::TemplateToolkit | PERL-MODULE-NAME
If default-template-adapter is undefined, create a template adapter based on this class with the compiled-in defaults. Class must inherit or implement the interface of Baldrick::TemplateAdapter. This setting is rarely used.

[edit] Examples

<Baldrick>
    random-seed-method = builtin
    site-admin-email = webmaster@example.com
    timelog = /tmp/baldrick-time.log
</Baldrick>
Personal tools