This script shows how LXR understood the configuration parameters from lxr.conf file. They are displayed in tabular form:
First column: parameter name
Second column: parameter type (string, array, hash, ...)
Third column: value from tree-specific parameter group
Fourth column: value from global parameter group
With such a layout, it is easy to see if a global value is overridden by a specific one.
dumphash ($h, $left)
Function dumphash
returns the contents of the input hash as a ready-to-print string.
The value of a key may be a simple string (displayed surrounded with quotes), an array (dumped "as is" without checking for further references) or a hash (recursively dumped surrounded with curly braces).
$h
a reference to the hash to dump
$left
the number of spaces at left to indent this hash
parmvalue ($parm, $pg)
Function parmvalue
dumps a parameter value if it exists in this parameter group.
After testing for parameter existence, processing is dispatched according to type value.
Parameter dbpass
is not dumped for security reason.
$parm
a parameter name as a string
$pg
a reference to a parameter group
parmexpand ($templ, $who, $pgs, $pgnr)
Function parmexpand
is a "$function" substitution function. It returns its block (contained in $tmpl
) expanded for each accessible configuration parameter.
$templ
a string containing the template (i.e. argument)
$who
a string containing the script name (i.e. showconfig) requesting this substitution
$pgs
a reference to the parameter group array
$pgnr
parameter group index
Parameter names are obtained from global $config
hash reference since all parameters end up there. "internal" parameters 'confpath'
and 'parmgroupnr'
are removed from the set.
A parameter may be defined in an included file like 'filetype'
from 'filetypeconf'
. In this case, both specific and global columns are empty.
A parameter is considered if it belongs in the global section or in the requested tree section.
To dump values anyway, force $config
usage instead of a parameter group through query argument _confall
with non zero value.
parmgrouplink ($pgnr, $pgs)
Function parmgrouplink
is a "$variable" substitution function. It returns an < A >
element invoking script showconfig to dump the designated parameter group.
$pgnr
parameter group index
$pgs
a reference to the parameter group array
Link is created only if $pgnr
has an acceptable value. Otherwise, function returns string 'none'
.
Output is controlled by a template
Eventually, a specific parameter group may be dumped by passing its index in URL argument _parmgroup
. This index may receive a default value through configuration parameter 'parmgroupnr'
.