Package
The PrefsCache package holds a cache of topics that have been read in, using
the TopicPrefs class. These functions manage that cache.
We maintain 2 hashes of values: | ||||||||
Added: | ||||||||
> > | ||||||||
Finalise preferences in this cache, by freezing any preferences
listed in FINALPREFERENCES at their current value.
ObjectMethod loadPrefsFromTopic ($web,$topic,$keyPrefix)Loads preferences from a topic. All settings loaded are prefixed with the key prefix (default '').ObjectMethod loadPrefsFromText ($text,$meta,$web,$topic)Loads preferences from text and optional metadata. All settings loaded are prefixed with the key prefix (default ''). If$meta is defined,
then metadata will be taken from that object. Otherwise, $text will
be parsed to extract meta-data.
ObjectMethod insert ($type,$key,$val) | ||||||||
Added: | ||||||||
> > | ||||||||
Adds a key-value pair of the given type to the object. Type is Set or Local.
Callback used for the Prefs::Parser object, or can be used to add
arbitrary new entries to a prefs cache.
Note that attempts to redefine final preferences will be ignored.
ObjectMethod stringify ($html,\%shown) -> $text | ||||||||
Added: | ||||||||
> > | ||||||||
Generate an (HTML if $html) representation of the content of this cache. |