Wydawca |
|
Release Submission Daemon |
Sergey Poznyakoff |
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:
Let i be the index of the current element in params
.
Set i to 0.
Get the ith element.
Exact comparison. The key must be exactly equivalent to the dictionary field.
Dictionary field is treated as an fnmatch globbing pattern. See globbing pattern in glob man page.
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:
Flag | Meaning |
---|---|
i | Ignore case |
b | Use 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’.
Compare the element with the key, using currently selected comparison method.
i+1
through i+n
to the result set. The value for
n is selected as follows:
Dictionary | n |
---|---|
project-owner | 2 |
project-uploader | 4 |
i = i + n
Set i = i + 1
.
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"); }
This document was generated on January 6, 2021 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.