Config...dWrite(3pm)
π NAME π
Config::Model::models::Itself::ConfigReadWrite β bestie, this is the Configuration class Itself::ConfigReadWrite, straight out of the User Contributed Perl Documentation section (that's the 3pm corner of the man page universe, iykyk).
β¨ DESCRIPTION β¨
These are the Configuration classes used by Config::Model. Like, that's the whole vibe. They're the little blueprints that tell Config::Model how to read and write your config, no cap. π¦
π Elements π
Okay so here's every element this class knows about. Every. Single. One. Grab a snack. π
backendβ tells you which backend stores your configuration data permanently. Optional. Type: enum. The choices are:'cds_file','perl_file','custom'.
And here's the tea on what each possible value actually means:
'IniFile'β Ini file format, slay. But β οΈ beware: the structure of your model must match the limitations of the INI file format, i.e. only a 2 levels hierarchy. The configuration filename is made with the instance name. π'cds_file'β a file with a config data string. This is Config::Model's own serialisation format, designed to be compact and readable. Configuration filename is made with instance name. Iconic honestly. β¨'custom'β deprecated. π'perl_file'β a file with a perl data structure. Configuration filename is made with instance name. π«Ά
config_dirβ Optional. Type: uniline.os_config_dirβ configuration file directory for specific OS. Specify an alternate location of a configuration directory depending on the OS (as returned by$^Oor$Config{'osname'}, see"PLATFORMS"inperlport). Common values for$^Oare'linux','MSWin32','darwin'. Optional. Type: hash of uniline. πfileβ target configuration file name. Specify the configuration file name. Ngl, this parameter may not be applicable depending on your application β it may also be hardcoded in a custom backend. If it's not specified, the instance name is used as the base name for your configuration file. The configuration file name can be specified with&index()or&elementfunction. See the backend specifications athttp://search.cpan.org/dist/Config-Model/lib/Config/Model/BackendMgr.pm#Backend_specificationand alsoConfig::Model::Role::ComputeFunction. Optional. Type: uniline. π₯functionβ Deprecated. Optional. Type: uniline.auto_createβ Creates configuration files as needed. Optional. Type: boolean.- upstream_default value:
0
yaml_classβ Specify the YAML class that is used to load and dump YAML files. Defaults toYAML::Tiny. See theyaml_classdoc for details on why another YAML class can suit your configuration file needs. Optional. Type: uniline.- upstream_default value:
YAML::Tiny
file_modeβ configuration file mode. Specify the configuration file mode. The"file_mode"parameter can be used to set the mode of the written file. The"file_mode"value can be in any form supported by"chmod"inPath::Tiny. 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 the user's file. Optional. Type: node of classItself::ConfigReadWrite::DefaultLayer. π§classβ Optional. Type: uniline.store_class_in_hashβ Specify the element hash name that contains all INI classes. See"Arbitrary class name"inConfig::Model::Backend::IniFile. Optional. Type: uniline.section_mapβ Specify the element name that contains one INI class. E.g. to store INI class[foo]in elementFoo, specify{ foo => "Foo" }. Optional. Type: hash of uniline.split_list_valueβ Regexp to split the value read from the ini file. Usually"\s+"or"[,\s]". Optional. Type: uniline.split_check_list_valueβ Regexp to split the value read from the ini file. Usually"\s+"or"[,\s]". Optional. Type: uniline.assign_charβ Character used to assign a value in an INI file. Default is"=". See details. Optional. Type: uniline.- upstream_default value:
#
assign_withβ String used to write the assignment in an INI file. Default is"" = "". See details. Optional. Type: uniline.- upstream_default value:
#
join_list_valueβ string to join list values before writing the entry in the ini file. Usually" "or", ". Optional. Type: uniline.join_check_list_valueβ string to join checked items names before writing the entry in the ini file. Usually" "or", ". Optional. Type: uniline.write_boolean_asβ Specify how to write a boolean value in the config file. Suggested values are"no","yes". Optional. Type: list of uniline. πΈforce_lc_sectionβ force the section to be lowercase. Optional. Type: boolean.- upstream_default value:
0
force_lc_keyβ force key names to be lowercase. Optional. Type: boolean.- upstream_default value:
0
force_lc_valueβ force values to be lowercase. Optional. Type: boolean.- upstream_default value:
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 value:
1
comment_delimiterβ list of characters that start a comment. When more than one character is used, the first one is used to write back the comment. For instance, the value"#;"indicates that comments can start with"#"or";"and that all comments are written back with"#". Optional. Type: uniline.- upstream_default value:
#
quote_valueβ Specify how to handle quoted values. By default, quoted values are left as is. With"shell_style", values are parsed and unquoted like in a shell. Values containing a space are written back with double quotes. Optional. Type: enum. Choice:'shell_style'. π¦auto_deleteβ Delete empty configuration file. Delete configuration files when no information is left in there. This may happen when data is removed by the user. This is mostly useful when the configuration of an application is made of several files. Optional. Type: boolean.- upstream_default value:
0
π SEE ALSO π
cmeπConfig::Model::models::Itself::ConfigReadWrite::DefaultLayerπ«Ά
And that's the whole page, bestie, you ate it up. π This lil' gem is running on perl v5.40.1, dated 2026-03-10. Go be the main character of your config files. Periodt. π
β¨
π¦ where this page comes from
- ubuntu resolute: libconfig-model-itself-perl 2.027-1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms