NAME
Config::Model::models::Itself::ConfigWrite - Configuration class Itself::ConfigWrite
DESCRIPTION
Configuration classes used by Config::Model
Elements
syntax
Deprecated parameter that specified the file syntax to store permanently configuration data. Replaced by "backend"Deprecated Optional. Type enum. choice: 'cds', 'perl', 'ini', 'custom'.
backend
specifies the backend to store permanently configuration data.Optional. Type enum. choice: 'cds_file', 'perl_file', 'ini_file', 'custom'.
Here are some explanations on the possible values:
- 'cds_file'
-
file with config data string. This is Config::Model own serialisation format, designed to be compact and readable. Configuration filename is made with instance name
- 'custom'
-
Custom format. You must specify your own class and method to perform the read or write function. See Config::Model::AutoRead doc for more details
- 'ini_file'
-
Ini file format. Beware that the structure of your model must match the limitations of the INI file format, i.e only a 2 levels hierarchy. Configuration filename is made with instance name
- 'perl_file'
-
file with a perl data structure. Configuration filename is made with instance name
Note: backend is migrated with '$old
' and with $old => "- syntax
" and '$replace{cds}
' => "cds_file
", '$replace{perl}
' => "perl_file
", '$replace{ini}
' => "ini_file
"
config_dir
Optional. Type uniline.
os_config_dir - configuration file directory for specific OS
Specify and alternate location of a configuration directory depending on the OS (as returned by $^O
or $Config{'osname'}
, see "PLATFORMS" in perlport) Common values for $^O
are 'linux', 'MSWin32', 'darwin'Optional. Type hash of uniline.
file - target configuration file name
specify the configuration file name. This parameter may not be applicable depending on your application. It may also be hardcoded in a custom backend. If not specified, the instance name will be used as base name for your configuration file.Optional. Type uniline.
default_layer - How to find default values in a global config file
Specifies where to find a global configuration file that specifies default values. For instance, this is used by OpenSSH to specify a global configuration file (/etc/ssh/ssh_config
) that is overridden by user's file. Optional. Type node of class Itself::ConfigWR::DefaultLayer .
class
Optional. Type uniline.
store_class_in_hash
Specify element hash name that will contain all INI classes. See "Arbitrary class name" in Config::Model::Backend::IniFileOptional. Type uniline.
section_map
Specify element name that will contain one INI class. E.g. to store INI class [foo] in element Foo, specify { foo => "Foo" } Optional. Type hash of uniline.
split_list_value
Regexp to split values stored in list element. Usually "\s+" or "[,\s]"Optional. Type uniline.
join_list_value
string to join values from list element. Usually " " or ", "Optional. Type uniline.
write_boolean_as
Specify how to write a boolean value in config file. Suggested values are "no","yes". Optional. Type list of uniline.
force_lc_section
force section to be lowercase. Optional. Type boolean. upstream_default: '0'.
force_lc_key
force key names to be lowercase. Optional. Type boolean. upstream_default: '0'.
force_lc_value
force values to be lowercase. Optional. Type boolean. upstream_default: '0'.
full_dump
Also dump default values in the data structure. Useful if the dumped configuration data will be used by the application. (default is yes)Optional. Type boolean. upstream_default: '1'.
comment_delimiter
comment starts with this character. Optional. Type uniline. upstream_default: '#'.
function
Optional. Type uniline.
auto_create - Creates configuration files as needed
Optional. Type boolean. upstream_default: '0'.