internal package
Foswiki::Configure::Load internal package
Foswiki::Configure::Load StaticMethod
readConfig([$noexpand][,$nospec][,$config_spec][,$noLocal) 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 normally reads
Foswiki.spec
to get defaults. Other spec files (those for extensions) are
not read unless the $config_spec flag is set.
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
- suppress expansion of $Foswiki vars embedded in values.
$nospec
- can be set when the caller knows that Foswiki.spec has already been read.
$config_spec
- if set, will also read Config.spec files located using the standard methods (iff !$nospec). Slow.
$noLocal
- if set, Load will not re-read an existing LocalSite.cfg. this is needed when testing the bootstrap. If it rereads an existing config, it overlays all the bootstrapped settings.
StaticMethod
expanded($value) → $expanded Given a value of a configuration item, expand references to $Foswiki::cfg configuration items within strings in the value.
If an embedded $Foswiki::cfg reference is not defined, it will be expanded as 'undef'.
StaticMethod
expandValue($datum [, $mode]) Expands references to Foswiki configuration items which occur in the values configuration items contained within the datum, which may be a hash or array reference, or a scalar value. The replacement is done in-place.
$mode - How to handle undefined values:StaticMethod
setBootstrap() This routine is called to initialize the bootstrap process. It sets the list of configuration parameters that will need to be set and "protected" during bootstrap.
If any keys will be set during bootstrap / initial creation of LocalSite.cfg, they should be added here so that they are preserved when the %Foswiki::cfg hash is wiped and re-initialized from the Foswiki spec.StaticMethod
bootstrapConfig() StaticMethod
_bootstrapSiteSettings() Called by bootstrapConfig. This handles the {Site} settings.
StaticMethod
_bootstrapStoreSettings() Called by bootstrapConfig. This handles the store specific settings. This in turn tests each Store Contib to determine if it's capable of bootstrapping.
StaticMethod
bootstrapWebSettings($script) Called by bootstrapConfig. This handles the web environment specific settings only:
{DefaultUrlHost}
{ScriptUrlPath}
{ScriptUrlPaths}{view}
{PubUrlPath}
StaticMethod
findDependencies(\%cfg) → \%deps \%cfg
configuration hash to scan; defaults to %Foswiki::cfg
forward
=> a hash mapping keys to a list of the keys that depend on their value
reverse
=> a hash mapping keys to a list of keys whose value they depend on.
StaticMethod
specChanged → @list