Config...gAccept(3pm)

โœจ NAME โœจ

okay bestie, meet Config::Model::models::Itself::ConfigAccept โ€” a Configuration class from the Itself::ConfigAccept era. she's the blueprint that tells Config::Model how to describe its own configuration elements, and she has OPINIONS ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

These are the configuration classes used by Config::Model โ€” like, the meta layer. the thing that describes the things. very main character, very inception-core ๐ŸŒˆ

๐ŸŽ€ Elements ๐ŸŽ€

this is the whole roster, no skips, no cuts, we're going through ALL of them:

  • name_match โ€” deprecated and optional, type uniline.
    • upstream_default value: .*
  • accept_after โ€” tells you where to insert the accepted element. heads up: this does not change the behavior at all, it just helps generate more consistent user interfaces. optional, type reference.
  • type โ€” specifies the type of the configuration element. Leaf is what you use for a plain value. mandatory (yeah, you have to give her this one), 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'.
    • here's the tea on a couple of those values:
    • 'integer' โ€” a positive or negative integer ๐Ÿงฎ
    • 'uniline' โ€” a string with no embedded newline
  • class โ€” Override implementation of element. this is the Perl class name used to override how the configuration element is implemented. and listen: that 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. optional, type uniline.
  • morph โ€” when this is set, a recurse copy of the value from the old object to the new object is attempted. old values get dropped when a copy isn't possible (usually because the types don't match). 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 โ€” same idea, but the path is computed using values 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. you can combine the keys of several hashes (or lists) 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 โ€” a path specifying a hash of value element in the configuration tree. the hash is used in a way similar to the replace parameter โ€” except the replacement isn't coded in the model, it's specified by the configuration. optional, type uniline.
  • compute โ€” computes the default value according to a formula and values from other elements in the configuration tree. optional, type warped_node.
  • migrate_from โ€” specifies an upgrade path from an old value, and computes the value to store in the new element. optional, type warped_node.
  • write_as โ€” specifies how to write a boolean value. example: 'no' 'yes'. optional, type list of uniline.
  • migrate_values_from โ€” says 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 โ€” says that the keys of the hash are copied from another hash in the configuration tree, but 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 when 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 โ€” specifies the possible values of an enum. you can also use this in a reference element, so the possible enum value becomes 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 a value from an external file when running cme update. this requires Config::Model >= 2.157. optional, type node of class Itself::CommonElement::Update.
  • default โ€” specify a 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 one is considered as "built_in" to the application, so it is not written in the configuration data (unless it's been modified). optional, type string.
  • convert โ€” convert value or index to uppercase (uc) or lowercase (lc). optional, type enum.
  • match โ€” a 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 return false. ngl, note that this snippet is also run on undefined values, which may not be what you want ๐Ÿ™ˆ optional, type hash of node of class Itself::CommonElement::Assert.
  • warn_if โ€” warn the user if the code snippet returns true. optional, type hash of node of class Itself::CommonElement::Assert.
  • warn_unless โ€” warn the user if the code snippet returns false. optional, type hash of node of class Itself::CommonElement::Assert.
  • warn_if_match โ€” warn the user if a defined value matches the regular expression. optional, type hash of node of class Itself::CommonElement::WarnIfMatch.
  • warn_unless_match โ€” warn the user if a 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 the user if a key is created matching this regular expression. optional, type uniline.
  • warn_unless_key_match โ€” warn the 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 ids 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 a 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 follow 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 the 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 โ€” specifies 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), or "forbid". optional, type enum. choices: 'allow', 'suppress', 'warn', 'forbid'.
    • upstream_default value: allow
  • help โ€” specify a help string applicable to values. the keys are regexps matched to the beginning of the value. see the "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 an important parameter, or to hide others. hidden parameters are mostly used to hide features that are unavailable at start time โ€” they can be made available later using the 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. the 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 ๐Ÿ‘‘

go read these next, bestie, they're the whole friend group ๐Ÿซถ

  • 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, no cap โœจ this one came from the User Contributed Perl Documentation collection, built for perl v5.40.1, dated 2026-03-10 โ€” she's iconic, she's detailed, she ate ๐Ÿ’…๐ŸŽ€๐Ÿ’–

๐Ÿ“ฆ where this page comes from