Config...lement(3pm)

πŸ’– Config::Model::models::Itself::Element πŸ’–

okay so bestie, welcome to a 3pm user-contributed Perl manual page, and it's the one for the configuration class Itself::Element. It's giving meta. It's giving "the class that describes how Config::Model describes itself." We're obsessed. πŸͺžβœ¨


πŸŽ€ NAME πŸŽ€

Config::Model::models::Itself::Element β€” a Configuration class, aka Itself::Element.


πŸ¦‹ DESCRIPTION πŸ¦‹

Configuration classes used by Config::Model. That's the whole summary, no notes. πŸ’…


✨ Elements ✨

This is the master list of every parameter you can use on an element. Every single one. Buckle up, we're going shopping. πŸ›οΈ

πŸ‘‘ type

Specify the type of the configuration element. Leaf is used for plain value.

Mandatory. Type: enum. Choices: 'node', 'warped_node', 'hash', 'list', 'leaf', 'check_list'.

🌸 value_type

Optional. Type: enum. Choices: 'boolean', 'enum', 'integer', 'reference', 'number', 'uniline', 'string', 'file', 'dir'.

And here are some explanations on the possible values, because we're helpful like that:

  • 'integer' β€” a positive or negative integer
  • 'uniline' β€” a string with no embedded newline

πŸ’… class - Override implementation of element

Perl class name used to override the implementation of the configuration element. This override Perl class must inherit a Config::Model class that matches the element type, i.e. Config::Model::Value, Config::Model::HashId or Config::Model::ListId.

Use with care. fr fr, be careful with this one.

Optional. Type: uniline.

πŸ¦‹ morph

When set, a recurse copy of the value from the old object to the new object is attempted. Old values are dropped when a copy is not possible (usually because of mismatching types). Optional. Type: boolean.

πŸŽ€ refer_to

Points to an array or hash element in the configuration tree using grab syntax. The available choice of this reference value (or check list) is made from the available keys of the pointed hash element or the values of the pointed array element. Optional. Type: uniline.

🌈 computed_refer_to

Points to an array or hash element in the configuration tree using a path computed with value from several other elements in the configuration tree. The available choice of this reference value (or check list) is made from the available keys of the pointed hash element or the values of the pointed array element. The keys of several hashes (or lists) can be combined by using the '+' operator in the formula. For instance, '! host:$a lan + ! host:foobar lan'. See Config::Model::IdElementReference for more details. Optional. Type: warped_node.

πŸ“ replace_follow

Path specifying a hash of value element in the configuration tree. The hash is used in a way similar to the replace parameter. In this case, the replacement is not coded in the model but specified by the configuration. Optional. Type: uniline.

⭐ compute

Compute the default value according to a formula and value from other elements in the configuration tree. Optional. Type: warped_node.

🧚 migrate_from

Specify an upgrade path from an old value and compute the value to store in the new element. Optional. Type: warped_node.

πŸ’œ write_as

Specify how to write a boolean value. Example 'no' 'yes'. Optional. Type: list of uniline.

πŸ”₯ migrate_values_from

Specifies that the values of the hash or list are copied from another hash or list in the configuration tree once configuration data are loaded. Optional. Type: uniline.

🫢 migrate_keys_from

Specifies that the keys of the hash are copied from another hash in the configuration tree only when the hash is created. Optional. Type: uniline.

✨ write_empty_value

By default, hash entries without data are not saved in configuration files. Set this parameter to 1 if a key must be saved in the configuration file even if the hash contains no value for that key. Optional. Type: boolean.

upstream_default value:

0

πŸ’– mandatory

Optional. Type: boolean.

🌸 config_class_name

Optional. Type: reference.

πŸ‘‘ choice

Specify the possible values of an enum. This can also be used in a reference element so the possible enum value will be the combination of the specified choice and the referred to values. Optional. Type: list of uniline.

πŸŽ€ min

Minimum value. Optional. Type: number.

πŸŽ€ max

Maximum value. Optional. Type: number.

πŸ¦‹ min_index

Minimum number of keys. Optional. Type: integer.

πŸ¦‹ max_index

Maximum number of keys. Optional. Type: integer.

⚑ update

Update instructions to get value from an external file when running cme update. This require Config::Model >= 2.157. Optional. Type: node of class Itself::CommonElement::Update.

⭐ default

Specify default value. This default value is written in the configuration data. Optional. Type: string.

🌈 upstream_default

Another way to specify a default value. But this default value is considered as "built_in" the application and is not written in the configuration data (unless modified). Optional. Type: string.

πŸ’… convert

Convert value or index to uppercase (uc) or lowercase (lc). Optional. Type: enum.

πŸ“ match

Perl regular expression to assert the validity of the value. To check the whole value, use "^" and "$". For instance "^foo|bar$" allows "foo" or "bar" but not "foobar". To be case insensitive, use the "(?i)" extended pattern. For instance, the regexp "^(?i)foo|bar$" also allows the values "Foo" and "Bar". Optional. Type: uniline.

🧚 assert

Raise an error if the test code snippet does returns false. Note this snippet is also run on undefined value, which may not be what you want. Optional. Type: hash of node of class Itself::CommonElement::Assert.

πŸ’œ warn_if

Warn user if the code snippet returns true. Optional. Type: hash of node of class Itself::CommonElement::Assert.

πŸ’œ warn_unless

Warn user if the code snippet returns false. Optional. Type: hash of node of class Itself::CommonElement::Assert.

πŸ”₯ warn_if_match

Warn user if a defined value matches the regular expression. Optional. Type: hash of node of class Itself::CommonElement::WarnIfMatch.

πŸ”₯ warn_unless_match

Warn user if defined value does not match the regular expression. Optional. Type: hash of node of class Itself::CommonElement::WarnIfMatch.

πŸ“£ warn

Unconditionally issue a warning with this string when this parameter is used. This should be used mostly with "accept". Optional. Type: string.

πŸ“š grammar

Feed this grammar to Parse::RecDescent to perform validation. Optional. Type: string.

πŸŽ€ default_list

Specify items checked by default. Optional. Type: check_list.

πŸŽ€ upstream_default_list

Specify items checked by default in the application. Optional. Type: check_list.

πŸ”‘ allow_keys_from

This hash allows keys from the keys of the hash pointed by the path string. Optional. Type: uniline.

πŸ”‘ allow_keys_matching

Keys must match the specified regular expression. Optional. Type: uniline.

πŸ”‘ follow_keys_from

This hash contains the same keys as the hash pointed by the path string. Optional. Type: uniline.

🚨 warn_if_key_match

Warn user if a key is created matching this regular expression. Optional. Type: uniline.

🚨 warn_unless_key_match

Warn user if a key is created not matching this regular expression. Optional. Type: uniline.

πŸ“‹ ordered

Keep track of the order of the elements of this hash. Optional. Type: boolean.

πŸ—οΈ default_keys

Default keys hashes. Optional. Type: list of string.

πŸ—οΈ auto_create_keys

Always create a set of keys specified in this list. Optional. Type: list of string.

πŸ—οΈ allow_keys

Specify a set of allowed keys. Optional. Type: list of string.

πŸ†” auto_create_ids

Always create the number of id specified in this integer. Optional. Type: string.

🧁 default_with_init

Specify a set of keys and values to create and initialize some elements. E.g. initialize of hash of nodes with ' foo => "X=Av Y=Bv", bar => "Y=Av Z=Cz"' or initialize a list of string with '0 => "foo", 1 => "bar"'. The values follows the syntax specified in "load string syntax" in Config::Model::Loader. Optional. Type: hash of string.

πŸ”’ max_nb

Optional. Type: integer.

πŸ”„ replace

Used for enum to substitute one value with another. This parameter must be used to enable user to upgrade a configuration with obsolete values. The old value is the key of the hash, the new one is the value of the hash. Optional. Type: hash of string.

πŸ‘― duplicates

Specify the policy regarding duplicated values stored in the list or as hash values (valid only when cargo type is "leaf"). The policy can be "allow" (default), "suppress", "warn" (which offers the possibility to apply a fix), "forbid". Optional. Type: enum. Choices: 'allow', 'suppress', 'warn', 'forbid'.

upstream_default value:

allow

πŸ†˜ help

Specify help string applicable to values. The keys are regexp matched to the beginning of the value. See "help" parameter of "DESCRIPTION" in Config::Model::Value for more possibilities. Optional. Type: hash of string.

🚦 status

Optional. Type: enum. Choices: 'obsolete', 'deprecated', 'standard'.

upstream_default value:

standard

πŸͺœ level

Used to highlight important parameter or to hide others. Hidden parameter are mostly used to hide features that are unavailable at start time. They can be made available later using warp mechanism. Optional. Type: enum. Choices: 'important', 'normal', 'hidden'.

upstream_default value:

normal

πŸ“ summary

Enter short information regarding this element. Optional. Type: uniline.

πŸ“– description

Enter detailed help information regarding this element. Optional. Type: string.

πŸŒ€ warp

Change the properties (i.e. default value or its value_type) dynamically according to the value of another Value object located elsewhere in the configuration tree. Optional. Type: warped_node of class Itself::WarpValue.

πŸ”€ index_type

Specify the type of allowed index for the hash. "String" means no restriction. Optional. Type: enum.

πŸ“¦ cargo

Specify the properties of the configuration element configuration in this hash or list. Optional. Type: warped_node.


🌟 SEE ALSO 🌟

  • cme
  • Config::Model::models::Itself::CommonElement::Assert
  • Config::Model::models::Itself::CommonElement::Update
  • Config::Model::models::Itself::CommonElement::WarnIfMatch
  • Config::Model::models::Itself::WarpValue

and that's the whole page bestie, you ate it πŸ’…βœ¨ this beauty is running on perl v5.40.1, dated 2026-03-10 β€” kisses, go configure something iconic 🫢🌈

πŸ“¦ where this page comes from