Wydawca (split by node):   Section:   Chapter:FastBack: configuring   Up: dictionaries   FastForward: wydawca.conf   Contents: Table of ContentsIndex: Concept Index

4.9.2 Built-in Dictionary

Builtin dictionaries are small dictionaries that keep all data in their params list. They are designed mainly for testing purposes.

Look ups in builtin dictionaries are performed as follows: The query value is expanded (see query). The resulting value is used as a key for lookup in params list. The list scanned as follows:

  1. INIT

    Let i be the index of the current element in params. Set i to 0.

  2. GETEL

    Get the ith element.

  3. If it begins with a slash, interpret it as comparison type indicator. Its possible values are:
    /exact

    Exact comparison. The key must be exactly equivalent to the dictionary field.

    /fnmatch

    Dictionary field is treated as an fnmatch globbing pattern. See globbing pattern in glob man page.

    /regex

    Dictionary field is treated as a regular expression. Unless configured otherwise by flags (see below), POSIX extended regular expressions are used (see Extended regular expressions in GNU sed).

    If that word ends with a comma, the characters following it are flags, defining the type of matching. Allowed flags are:

    FlagMeaning
    iIgnore case
    bUse basic regular expressions

    For example, the string ‘/exact,i’ specifies case-insensitive exact comparison, the string ‘/regex,bi’ specifies case-insensitive basic regular expression matching, etc.

    Go to step ‘INCR’.

  4. COMP

    Compare the element with the key, using currently selected comparison method.

  5. If the element matches the key, add elements i+1 through i+n to the result set. The value for n is selected as follows:
    Dictionaryn
    project-owner2
    project-uploader4
  6. Set i = i + n
  7. INCR

    Set i = i + 1.

  8. LOOP

    If i is greater than the number of elements in param, then stop. Otherwise, go to step ‘GETEL’.

For example, the following defines the ‘project-owner’ dictionary, containing data for projects ‘foo’ and ‘bar’:

dictionary project-owner {
  type builtin;
  query "${project}";
  params ("/exact",
          "foo", "foo-owner@domain.net", "Foo Admin",
          "bar", "smith@other.net", "John Smith");
}

Wydawca (split by node):   Section:   Chapter:FastBack: configuring   Up: dictionaries   FastForward: wydawca.conf   Contents: Table of ContentsIndex: Concept Index