1Config::Model::AnyThingU(s3e)r Contributed Perl DocumentaCtoinofnig::Model::AnyThing(3)
2
3
4
6 Config::Model::AnyThing - Base class for configuration tree item
7
9 version 2.129
10
12 # internal class
13
15 This class must be inherited by all nodes or leaves of the
16 configuration tree.
17
18 AnyThing provides some methods and no constructor.
19
21 element_name
22 Returns the element name that contain this object.
23
24 index_value
25 For object stored in an array or hash element, returns the index (or
26 key) containing this object.
27
28 parent
29 Returns the node containing this object. May return undef if "parent"
30 is called on the root of the tree.
31
32 container_type
33 Returns the type (e.g. "list" or "hash" or "leaf" or "node" or
34 "warped_node") of the element containing this object.
35
36 root
37 Returns the root node of the configuration tree.
38
39 location
40 Returns the node location in the configuration tree. This location
41 conforms with the syntax defined by grab method.
42
43 location_short
44 Returns the node location in the configuration tree. This location
45 truncates long indexes to be readable. It cannot be used by grab
46 method.
47
48 composite_name
49 Return the element name with its index (if any). I.e. returns "foo:bar"
50 or "foo".
51
52 composite_name_short
53 Return the element name with its index (if any). Too long indexes are
54 truncated to be readable.
55
57 Annotation is a way to store miscellaneous information associated to
58 each node. (Yeah... comments). Reading and writing annotation makes
59 sense only if they can be read from and written to the configuration
60 file, hence the need for the following method:
61
62 backend_support_annotation
63 Returns 1 if at least one of the backends attached to a parent node
64 support to read and write annotations (aka comments) in the
65 configuration file.
66
67 support_annotation
68 Returns 1 if at least one of the backends support to read and write
69 annotations (aka comments) in the configuration file.
70
71 annotation
72 Parameters: "( [ note1, [ note2 , ... ] ] )"
73
74 Without argument, return a string containing the object's annotation
75 (or an empty string).
76
77 With several arguments, join the arguments with "\n", store the
78 annotations and return the resulting string.
79
80 load_pod_annotation
81 Parameters: "( pod_string )"
82
83 Load annotations in configuration tree from a pod document. The pod
84 must be in the form:
85
86 =over
87
88 =item path
89
90 Annotation text
91
92 =back
93
94 clear_annotation
95 Clear the annotation of an element
96
98 notify_change
99 Notify the instance of semantic changes. Parameters are:
100
101 old old value. (optional)
102
103 new new value (optional)
104
105 path Location of the changed parameter starting from root node.
106 Default to "$self-"location>.
107
108 name element name. Default to "$self-"element_name>
109
110 index If the changed parameter is part of a hash or an array, "index"
111 contains the key or the index to get the changed parameter.
112
113 note information about the change. Mandatory when neither old or new
114 value are defined.
115
116 really When set to 1, force recording of change even if in initial
117 load phase.
118
119 needs_save
120 internal parameter.
121
122 show_message
123 Parameters: "( string )"
124
125 Forwarded to "show_message" in Config::Model::Instance.
126
127 root_path
128 Forwarded to "root_path" in Config::Model::Instance.
129
130 model_searcher
131 Returns an object dedicated to search an element in the configuration
132 model (respecting privilege level).
133
134 This method returns a Config::Model::SearchElement object. See
135 Config::Model::Searcher for details on how to handle a search.
136
137 dump_as_data
138 Dumps the configuration data of the node and its siblings into a perl
139 data structure.
140
141 Returns a hash ref containing the data. See Config::Model::DumpAsData
142 for details.
143
144 warp_error
145 Returns a string describing any issue with Config::Model::Warper
146 object. Returns '' if invoked on a tree object without warp
147 specification.
148
150 Dominique Dumont, (ddumont at cpan dot org)
151
153 Config::Model, Config::Model::Instance, Config::Model::Node,
154 Config::Model::Loader, Config::Model::Dumper
155
157 Dominique Dumont
158
160 This software is Copyright (c) 2005-2018 by Dominique Dumont.
161
162 This is free software, licensed under:
163
164 The GNU Lesser General Public License, Version 2.1, February 1999
165
166
167
168perl v5.28.1 2018-12-07 Config::Model::AnyThing(3)