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 $^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. 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 &element function. See the backend specifications at http://search.cpan.org/dist/Config-Model/lib/Config/Model/BackendMgr.pm#Backend_specification and also Config::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 to YAML::Tiny. See the yaml_class doc 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" in Path::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 class Itself::ConfigReadWrite::DefaultLayer. 🧚
  • class β€” Optional. Type: uniline.
  • store_class_in_hash β€” Specify the element hash name that contains all INI classes. See "Arbitrary class name" in Config::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 element Foo, 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