.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Config::Model::AnyId 3pm" .TH Config::Model::AnyId 3pm "2019-01-15" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Config::Model::AnyId \- Base class for hash or list element .SH "VERSION" .IX Header "VERSION" version 2.133 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Config::Model; \& \& # define configuration tree object \& my $model = Config::Model\->new; \& $model\->create_config_class( \& name => "Foo", \& element => [ \& [qw/foo bar/] => { \& type => \*(Aqleaf\*(Aq, \& value_type => \*(Aqstring\*(Aq \& }, \& ] \& ); \& \& $model\->create_config_class( \& name => "MyClass", \& element => [ \& plain_hash => { \& type => \*(Aqhash\*(Aq, \& index_type => \*(Aqstring\*(Aq, \& cargo => { \& type => \*(Aqleaf\*(Aq, \& value_type => \*(Aqstring\*(Aq, \& }, \& }, \& bounded_hash => { \& type => \*(Aqhash\*(Aq, # hash id \& index_type => \*(Aqinteger\*(Aq, \& \& # hash boundaries \& min_index => 1, max_index => 123, max_nb => 2, \& \& # specify cargo held by hash \& cargo => { \& type => \*(Aqleaf\*(Aq, \& value_type => \*(Aqstring\*(Aq \& }, \& }, \& bounded_list => { \& type => \*(Aqlist\*(Aq, # list id \& \& max_index => 123, \& cargo => { \& type => \*(Aqleaf\*(Aq, \& value_type => \*(Aqstring\*(Aq \& }, \& }, \& hash_of_nodes => { \& type => \*(Aqhash\*(Aq, # hash id \& index_type => \*(Aqstring\*(Aq, \& cargo => { \& type => \*(Aqnode\*(Aq, \& config_class_name => \*(AqFoo\*(Aq \& }, \& }, \& ], \& ); \& \& my $inst = $model\->instance( root_class_name => \*(AqMyClass\*(Aq ); \& \& my $root = $inst\->config_root; \& \& # put data \& my $steps = \*(Aqplain_hash:foo=boo bounded_list=foo,bar,baz \& bounded_hash:3=foo bounded_hash:30=baz \& hash_of_nodes:"foo node" foo="in foo node" \- \& hash_of_nodes:"bar node" bar="in bar node" \*(Aq; \& $root\->load( steps => $steps ); \& \& # dump resulting tree \& print $root\->dump_tree; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class provides hash or list elements for a Config::Model::Node. .PP The hash index can either be en enumerated type, a boolean, an integer or a string. .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" AnyId object should not be created directly. .SH "Hash or list model declaration" .IX Header "Hash or list model declaration" A hash or list element must be declared with the following parameters: .IP "type" 4 .IX Item "type" Mandatory element type. Must be \f(CW\*(C`hash\*(C'\fR or \f(CW\*(C`list\*(C'\fR to have a collection element. The actual element type must be specified by \&\f(CW\*(C`cargo =\*(C'\fR type> (See \*(L"\s-1CAVEATS\*(R"\s0). .IP "index_type" 4 .IX Item "index_type" Either \f(CW\*(C`integer\*(C'\fR or \f(CW\*(C`string\*(C'\fR. Mandatory for hash. .IP "ordered" 4 .IX Item "ordered" Whether to keep the order of the hash keys (default no). (a bit like Tie::IxHash). The hash keys are ordered along their creation. The order can be modified with swap, move_up or move_down. .IP "duplicates" 4 .IX Item "duplicates" Specify the policy regarding duplicated values stored in the list or as hash values (valid only when cargo type is \f(CW\*(C`leaf\*(C'\fR). The policy can be \&\f(CW\*(C`allow\*(C'\fR (default), \f(CW\*(C`suppress\*(C'\fR, \f(CW\*(C`warn\*(C'\fR (which offers the possibility to apply a fix), \f(CW\*(C`forbid\*(C'\fR. Note that duplicates \fIcheck cannot be performed when the duplicated value is stored\fR: this happens outside of this object. Duplicates can be check only after when the value is read. .IP "write_empty_value" 4 .IX Item "write_empty_value" By default, hash entries without data are not saved in configuration files. Without data means the cargo of the hash key is empty: either its value is undef or all the values of the contained node are also empty. .Sp Set this parameter to 1 if the key must be saved in the configuration file even if the hash contains no value for that key. .Sp Note that writing hash entries without value may not be supported by all backends. Use with care. Supported only for hash elements. .IP "cargo" 4 .IX Item "cargo" Hash ref specifying the cargo held by the hash of list. This has must contain: .RS 4 .IP "type" 8 .IX Item "type" Can be \f(CW\*(C`node\*(C'\fR or \f(CW\*(C`leaf\*(C'\fR (default). .IP "config_class_name" 8 .IX Item "config_class_name" Specifies the type of configuration object held in the hash. Only valid when \f(CW\*(C`cargo\*(C'\fR \f(CW\*(C`type\*(C'\fR is \f(CW\*(C`node\*(C'\fR. .IP "" 8 .IX Item "" Constructor arguments passed to the cargo object. See Config::Model::Node when \f(CW\*(C`cargo\->type\*(C'\fR is \f(CW\*(C`node\*(C'\fR. See Config::Model::Value when \f(CW\*(C`cargo\->type\*(C'\fR is \f(CW\*(C`leaf\*(C'\fR. .RE .RS 4 .RE .IP "min_index" 4 .IX Item "min_index" Specify the minimum value (optional, only for hash and for integer index) .IP "max_index" 4 .IX Item "max_index" Specify the maximum value (optional, only for list or for hash with integer index) .IP "max_nb" 4 .IX Item "max_nb" Specify the maximum number of indexes. (hash only, optional, may also be used with string index type) .IP "default_keys" 4 .IX Item "default_keys" When set, the default parameter (or set of parameters) are used as default keys hashes and created automatically when the \f(CW\*(C`keys\*(C'\fR or \f(CW\*(C`exists\*(C'\fR functions are used on an \fIempty\fR hash. .Sp You can use \f(CW\*(C`default_keys => \*(Aqfoo\*(Aq\*(C'\fR, or \f(CW\*(C`default_keys => [\*(Aqfoo\*(Aq, \*(Aqbar\*(Aq]\*(C'\fR. .IP "default_with_init" 4 .IX Item "default_with_init" To perform special set-up on children nodes you can also use .Sp .Vb 4 \& default_with_init => { \& foo => \*(AqX=Av Y=Bv\*(Aq, \& bar => \*(AqY=Av Z=Cv\*(Aq \& } .Ve .Sp When the hash contains leaves, you can also use: .Sp .Vb 4 \& default_with_init => { \& def_1 => \*(Aqdef_1 stuff\*(Aq, \& def_2 => \*(Aqdef_2 stuff\*(Aq \& } .Ve .IP "migrate_keys_from" 4 .IX Item "migrate_keys_from" Specifies that the keys of the hash are copied from another hash in the configuration tree only when the hash is read for the first time after initial load (i.e. once the configuration files are completely read). .Sp .Vb 1 \& migrate_keys_from => \*(Aq\- another_hash\*(Aq .Ve .IP "migrate_values_from" 4 .IX Item "migrate_values_from" Specifies that the values of the hash (or list) are copied from another hash (or list) in the configuration tree only when the hash (or list) is read for the first time after initial load (i.e. once the configuration files are completely read). .Sp .Vb 1 \& migrate_values_from => \*(Aq\- another_hash_or_list\*(Aq .Ve .IP "follow_keys_from" 4 .IX Item "follow_keys_from" Specifies that the keys of the hash follow the keys of another hash in the configuration tree. In other words, the created hash always has the same keys as the other hash. .Sp .Vb 1 \& follow_keys_from => \*(Aq\- another_hash\*(Aq .Ve .IP "allow_keys" 4 .IX Item "allow_keys" Specifies authorized keys: .Sp .Vb 1 \& allow_keys => [\*(Aqfoo\*(Aq,\*(Aqbar\*(Aq,\*(Aqbaz\*(Aq] .Ve .IP "allow_keys_from" 4 .IX Item "allow_keys_from" A bit like the \f(CW\*(C`follow_keys_from\*(C'\fR parameters. Except that the hash pointed to by \f(CW\*(C`allow_keys_from\*(C'\fR specified the authorized keys for this hash. .Sp .Vb 1 \& allow_keys_from => \*(Aq\- another_hash\*(Aq .Ve .IP "allow_keys_matching" 4 .IX Item "allow_keys_matching" Keys must match the specified regular expression. For instance: .Sp .Vb 1 \& allow_keys_matching => \*(Aq^foo\ed\ed$\*(Aq .Ve .IP "auto_create_keys" 4 .IX Item "auto_create_keys" When set, the default parameter (or set of parameters) are used as keys hashes and created automatically. (valid only for hash elements) .Sp Called with \f(CW\*(C`auto_create_keys => [\*(Aqfoo\*(Aq]\*(C'\fR, or \&\f(CW\*(C`auto_create_keys => [\*(Aqfoo\*(Aq, \*(Aqbar\*(Aq]\*(C'\fR. .IP "warn_if_key_match" 4 .IX Item "warn_if_key_match" Issue a warning if the key matches the specified regular expression .IP "warn_unless_key_match" 4 .IX Item "warn_unless_key_match" Issue a warning unless the key matches the specified regular expression .IP "auto_create_ids" 4 .IX Item "auto_create_ids" Specifies the number of elements to create automatically. E.g. \f(CW\*(C`auto_create_ids => 4\*(C'\fR initializes the list with 4 undef elements. (valid only for list elements) .IP "convert => [uc | lc ]" 4 .IX Item "convert => [uc | lc ]" The hash key are converted to uppercase (uc) or lowercase (lc). .IP "warp" 4 .IX Item "warp" See \*(L"Warp: dynamic value configuration\*(R" below. .SH "Warp: dynamic value configuration" .IX Header "Warp: dynamic value configuration" The Warp functionality enables an HashId or ListId object to change its default settings (e.g. \f(CW\*(C`min_index\*(C'\fR, \f(CW\*(C`max_index\*(C'\fR or \f(CW\*(C`max_nb\*(C'\fR parameters) dynamically according to the value of another \f(CW\*(C`Value\*(C'\fR object. (See Config::Model::Warper for explanation on warp mechanism) .PP For instance, with this model: .PP .Vb 10 \& $model \->create_config_class \& ( \& name => \*(AqRoot\*(Aq, \& \*(Aqelement\*(Aq \& => [ \& macro => { type => \*(Aqleaf\*(Aq, \& value_type => \*(Aqenum\*(Aq, \& name => \*(Aqmacro\*(Aq, \& choice => [qw/A B C/], \& }, \& warped_hash => { type => \*(Aqhash\*(Aq, \& index_type => \*(Aqinteger\*(Aq, \& max_nb => 3, \& warp => { \& follow => \*(Aq\- macro\*(Aq, \& rules => { A => { max_nb => 1 }, \& B => { max_nb => 2 } \& } \& }, \& cargo => { type => \*(Aqnode\*(Aq, \& config_class_name => \*(AqDummy\*(Aq \& } \& }, \& ] \& ); .Ve .PP Setting \f(CW\*(C`macro\*(C'\fR to \f(CW\*(C`A\*(C'\fR means that \f(CW\*(C`warped_hash\*(C'\fR can only accept one instance of \f(CW\*(C`Dummy\*(C'\fR. .PP Setting \f(CW\*(C`macro\*(C'\fR to \f(CW\*(C`B\*(C'\fR means that \f(CW\*(C`warped_hash\*(C'\fR accepts two instances of \f(CW\*(C`Dummy\*(C'\fR. .PP Like other warped class, a HashId or ListId can have multiple warp masters (See \*(L"Warp follow argument\*(R" in Config::Model::Warper: .PP .Vb 7 \& warp => { follow => { m1 => \*(Aq\- macro1\*(Aq, \& m2 => \*(Aq\- macro2\*(Aq \& }, \& rules => [ \*(Aq$m1 eq "A" and $m2 eq "A2"\*(Aq => { max_nb => 1}, \& \*(Aq$m1 eq "A" and $m2 eq "B2"\*(Aq => { max_nb => 2} \& ], \& } .Ve .SS "Warp and auto_create_ids or auto_create_keys" .IX Subsection "Warp and auto_create_ids or auto_create_keys" When a warp is applied with \f(CW\*(C`auto_create_keys\*(C'\fR or \f(CW\*(C`auto_create_ids\*(C'\fR parameter, the auto_created items are created if they are not already present. But this warp never removes items that were previously auto created. .PP For instance, when a tied hash is created with \&\f(CW\*(C`auto_create => [a,b,c]\*(C'\fR, the hash contains \f(CW\*(C`(a,b,c)\*(C'\fR. .PP Then, once a warp with \f(CW\*(C`auto_create_keys => [c,d,e]\*(C'\fR is applied, the hash then contains \f(CW\*(C`(a,b,c,d,e)\*(C'\fR. The items created by the first auto_create_keys are not removed. .SS "Warp and max_nb" .IX Subsection "Warp and max_nb" When a warp is applied, the items that do not fit the constraint (e.g. min_index, max_index) are removed. .PP For the max_nb constraint, an exception is raised if a warp leads to a number of items greater than the max_nb constraint. .SH "Content check" .IX Header "Content check" By default, this class provides an optional content check that checks for duplicated values (when \f(CW\*(C`duplicates\*(C'\fR parameter is set). .PP Derived classes can register more global checker with the following method. .SS "add_check_content" .IX Subsection "add_check_content" This method expects a sub ref with signature \f(CW\*(C`( $self, $error, $warn, $apply_fix )\*(C'\fR. Where \f(CW$error\fR and \f(CW$warn\fR are array ref. You can push error or warning messages there. \f(CW$apply_fix\fR is a boolean. When set to 1, the passed method can fix the warning or the error. Please make sure to weaken \f(CW$self\fR to avoid memory cycles. .PP Example: .PP .Vb 4 \& package MyId; \& use Mouse; \& extends qw/Config::Model::HashId/; \& use Scalar::Util qw/weaken/; \& \& sub setup { \& my $self = shift; \& weaken($self); \& $self\-> add_check_content( sub { $self\->check_usused_licenses(@_);} ) \&} .Ve .SH "Introspection methods" .IX Header "Introspection methods" The following methods returns the current value stored in the Id object (as declared in the model unless they were warped): .IP "min_index" 4 .IX Item "min_index" .PD 0 .IP "max_index" 4 .IX Item "max_index" .IP "max_nb" 4 .IX Item "max_nb" .IP "index_type" 4 .IX Item "index_type" .IP "default_keys" 4 .IX Item "default_keys" .IP "default_with_init" 4 .IX Item "default_with_init" .IP "follow_keys_from" 4 .IX Item "follow_keys_from" .IP "auto_create_ids" 4 .IX Item "auto_create_ids" .IP "auto_create_keys" 4 .IX Item "auto_create_keys" .IP "ordered" 4 .IX Item "ordered" .IP "morph" 4 .IX Item "morph" .IP "config_model" 4 .IX Item "config_model" .PD .SS "get_cargo_type" .IX Subsection "get_cargo_type" Returns the object type contained by the hash or list (i.e. returns \&\f(CW\*(C`cargo \-> type\*(C'\fR). .SS "get_cargo_info" .IX Subsection "get_cargo_info" Parameters: \f(CW\*(C`( < what > )\*(C'\fR .PP Returns more info on the cargo contained by the hash or list. \f(CW\*(C`what\*(C'\fR may be \f(CW\*(C`value_type\*(C'\fR or any other cargo info stored in the model. Returns undef if the requested info is not provided in the model. .SS "get_default_keys" .IX Subsection "get_default_keys" Returns a list (or a list ref) of the current default keys. These keys can be set by the \f(CW\*(C`default_keys\*(C'\fR or \f(CW\*(C`default_with_init\*(C'\fR parameters or by the other hash pointed by \f(CW\*(C`follow_keys_from\*(C'\fR parameter. .SS "name" .IX Subsection "name" Returns the object name. The name finishes with ' id'. .SS "config_class_name" .IX Subsection "config_class_name" Returns the config_class_name of collected elements. Valid only for collection of nodes. .PP This method returns undef if \f(CW\*(C`cargo\*(C'\fR \f(CW\*(C`type\*(C'\fR is not \f(CW\*(C`node\*(C'\fR. .SS "has_fixes" .IX Subsection "has_fixes" Returns the number of fixes that can be applied to the current value. .SH "Information management" .IX Header "Information management" .SS "fetch_with_id" .IX Subsection "fetch_with_id" Parameters: \f(CW\*(C`( index => $idx , [ check => \*(Aqno\*(Aq ])\*(C'\fR .PP Fetch the collected element held by the hash or list. Index check is 'yes' by default. Can be called with one parameter which is used as index. .SS "get" .IX Subsection "get" Get a value from a directory like path. Parameters are: .IP "path" 4 .IX Item "path" Poor man's version of XPath style path. This string is in the form: .Sp .Vb 1 \& /foo/bar/4 .Ve .Sp Each word between the '/' is either an element name or a hash key or a list index. .IP "mode" 4 .IX Item "mode" Either \f(CW\*(C`default\*(C'\fR, \f(CW\*(C`custom\*(C'\fR, \f(CW\*(C`user\*(C'\fR,... See \f(CW\*(C`mode\*(C'\fR parameter in .IP "check" 4 .IX Item "check" Either \f(CW\*(C`skip\*(C'\fR, \f(CW\*(C`no\*(C'\fR .IP "get_obj" 4 .IX Item "get_obj" If the path leads to a leaf, this parameter tell whether to return the stored value or the value object. .IP "autoadd" 4 .IX Item "autoadd" Whether to create missing keys .IP "dir_char_mockup" 4 .IX Item "dir_char_mockup" When the hash key used contains '/', (for instance a directory value), the key cannot be used as is with this method. Because '/' is already used to separate configuration items (this is also important with Config::Model::FuseUI). This parameter specifies how the forbidden \&'/' char is shown in the path. Default is \f(CW\*(C`\*(C'\fR .SS "set" .IX Subsection "set" Parameters: \f(CW\*(C`( path, value )\*(C'\fR .PP Set a value with a directory like path. .SS "copy" .IX Subsection "copy" Parameters: \f(CW\*(C`( from_index, to_index )\*(C'\fR .PP Deep copy an element within the hash or list. If the element contained by the hash or list is a node, all configuration information is copied from one node to another. .SS "fetch_all" .IX Subsection "fetch_all" Returns an array containing all elements held by the hash or list. .SS "fetch_all_values" .IX Subsection "fetch_all_values" Parameters: \f(CW\*(C`( mode => ..., check => ...)\*(C'\fR .PP Returns an array containing all defined values held by the hash or list. (undefined values are simply discarded). This method is only valid for hash or list containing leaves. .PP With \f(CW\*(C`mode\*(C'\fR parameter, this method returns either: .IP "custom" 4 .IX Item "custom" The value entered by the user .IP "preset" 4 .IX Item "preset" The value entered in preset mode .IP "standard" 4 .IX Item "standard" The value entered in preset mode or checked by default. .IP "default" 4 .IX Item "default" The default value (defined by the configuration model) .SS "fetch" .IX Subsection "fetch" Similar to \*(L"fetch_all_values\*(R", with the same parameters, Returns the result as a string with comma separated list values. .SS "fetch_all_indexes" .IX Subsection "fetch_all_indexes" Returns an array containing all indexes of the hash or list. Hash keys are sorted alphabetically, except for ordered hashed. .SS "children" .IX Subsection "children" Like fetch_all_indexes. This method is polymorphic for all non-leaf objects of the configuration tree. .SS "defined" .IX Subsection "defined" Parameters: \f(CW\*(C`( index )\*(C'\fR .PP Returns true if the value held at \f(CW\*(C`index\*(C'\fR is defined. .SS "exists" .IX Subsection "exists" Parameters: \f(CW\*(C`( index )\*(C'\fR .PP Returns true if the value held at \f(CW\*(C`index\*(C'\fR exists (i.e the key exists but the value may be undefined). This method may not make sense for list element. .SS "has_data" .IX Subsection "has_data" Return true if the array or hash is not empty. .SS "delete" .IX Subsection "delete" Parameters: \f(CW\*(C`( index )\*(C'\fR .PP Delete the \f(CW\*(C`index\*(C'\fRed value .SS "clear" .IX Subsection "clear" Delete all values (also delete underlying value or node objects). .SS "clear_values" .IX Subsection "clear_values" Delete all values (without deleting underlying value objects). .SS "warning_msg" .IX Subsection "warning_msg" Parameters: \f(CW\*(C`( [index] )\*(C'\fR .PP Returns warnings concerning indexes of this hash. Without parameter, returns a string containing all warnings or undef. With an index, return the warnings concerning this index or undef. .SS "has_warning" .IX Subsection "has_warning" Returns the current number of warning. .SS "error_msg" .IX Subsection "error_msg" Returns the error messages of this object (if any) .SH "AUTHOR" .IX Header "AUTHOR" Dominique Dumont, ddumont [\s-1AT\s0] cpan [\s-1DOT\s0] org .SH "SEE ALSO" .IX Header "SEE ALSO" Config::Model, Config::Model::Instance, Config::Model::Node, Config::Model::WarpedNode, Config::Model::HashId, Config::Model::ListId, Config::Model::CheckList, Config::Model::Value .SH "AUTHOR" .IX Header "AUTHOR" Dominique Dumont .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2005\-2018 by Dominique Dumont. .PP This is free software, licensed under: .PP .Vb 1 \& The GNU Lesser General Public License, Version 2.1, February 1999 .Ve