Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://wiki.cs.msu.ru/System/PerlDoc?module=Foswiki::Configure::Load
Дата изменения: Unknown Дата индексирования: Mon Apr 11 15:53:28 2016 Кодировка: koi8-r |
internal package
Foswiki::Configure::Load internal package
Foswiki::Configure::Load StaticMethod
readConfig([$noexpand]) BEGIN
block of Foswiki.pm
. However, when benchmarking/debugging it can be
replaced by custom code which sets the configuration hash. To prevent us from
overriding the custom code again, we use an "unconfigurable" key
$cfg{ConfigurationFinished}
as an indicator.
Note that this method is called by Foswiki and configure, and only reads
Foswiki.spec= to get defaults. Other spec files (those for extensions) are
not read.
The assumption is that configure
will be run when an extension is installed,
and that will add the config values to LocalSite.cfg, so no defaults are
needed. Foswiki.spec is still read because so much of the core code doesn't
provide defaults, and it would be silly to have them in two places anyway.
$noexpand can be set to suppress expansion of $Foswiki vars embedded in values.
StaticMethod
expandValue($datum) Expands references to Foswiki configuration items which occur in the values configuration items contained within the datum, which may be a hash reference or a scalar value. The replacement is done in-place.
StaticMethod
readDefaults() → \@errors configure
to initialise the Foswiki config hash with
default values from the .spec files.
Normally all configuration values come from LocalSite.cfg. However when
configure
runs it has to get default values for config vars that have not
yet been saved to LocalSite.cfg
.
Returns a reference to a list of the errors it saw.
SEE ALSO: Foswiki::Configure::FoswikiCfg::load