Konstrukt::Settings - Settings management
#there is one registy object that may be used from everywhere in the konstrukt-code #set a default value. very useful in the init() method of your plugin $Konstrukt::Settings->default('yourplugin/key' => 'defaultvalue'); #set a value $Konstrukt::Settings->set('yourplugin/key' => 'value'); #get a value my $value = $Konstrukt::Settings->get('key');
This is the place where all settings are stored. The initial settings will be loaded from your konstrukt.settings, which is placed in the document root of each site.
Note that the settings are not persistent between multiple requests! They will be (re)loaded on each request. For persistance take a look at Konstrukt::Session.
For further information take a look at the documentation for each method.
All initial settings are stored in your konstrukt.settings, which is placed in the document root of each site.
Each directive looks like this:
some/plugins/setting here go the values #this comment will be ignored
Take a look at the documentation of each module/plugin. If it offers settings, they will be described at the CONFIGURATION section of each module/plugin.
Constructor of this class
Initialization of this class
Loads the settings from the specified file
Parameters:
$file - The path (relative to the document root) to the settings file.
Returns a value from the konstrukt settings.
$key - The settings key
Works similary to get() but accepts two parameters and lets you set values instead of reading them.
$key - The name of the entry
$value - The value you want to set
Only sets a value if it's not been set, yet. Useful for specifying default settins.
Works similary to get() and set() but instead of reading or writing from or to an entry you simply clear a value of a specific entry.
$key - The entry to delete
Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.
This document is free software. It is distributed under the same terms as Perl itself.
Konstrukt
To install Konstrukt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Konstrukt
CPAN shell
perl -MCPAN -e shell install Konstrukt
For more information on module installation, please visit the detailed CPAN module installation guide.