.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" 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 turned on, 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::AnyThing 3pm" .TH Config::Model::AnyThing 3pm "2014-09-24" "perl v5.20.0" "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::AnyThing \- Base class for configuration tree item .SH "VERSION" .IX Header "VERSION" version 2.061 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& # internal class .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class must be inherited by all nodes or leaves of the configuration tree. .PP AnyThing provides some methods and no constructor. .SH "Introspection methods" .IX Header "Introspection methods" .SS "\fIelement_name()\fP" .IX Subsection "element_name()" Returns the element name that contain this object. .SS "\fIindex_value()\fP" .IX Subsection "index_value()" For object stored in an array or hash element, returns the index (or key) containing this object. .SS "\fIparent()\fP" .IX Subsection "parent()" Returns the node containing this object. May return undef if \f(CW\*(C`parent()\*(C'\fR is called on the root of the tree. .SS "\fIcontainer_type()\fP" .IX Subsection "container_type()" Returns the type (e.g. \f(CW\*(C`list\*(C'\fR or \f(CW\*(C`hash\*(C'\fR or \f(CW\*(C`leaf\*(C'\fR or \f(CW\*(C`node\*(C'\fR or \&\f(CW\*(C`warped_node\*(C'\fR) of the element containing this object. .SS "\fIroot()\fP" .IX Subsection "root()" Returns the root node of the configuration tree. .SS "\fIlocation()\fP" .IX Subsection "location()" Returns the node location in the configuration tree. This location conforms with the syntax defined by \*(L"\fIgrab()\fR\*(R" method. .SS "composite_name" .IX Subsection "composite_name" Return the element name with its index (if any). I.e. returns \f(CW\*(C`foo:bar\*(C'\fR or \&\f(CW\*(C`foo\*(C'\fR. .SH "Annotation" .IX Header "Annotation" Annotation is a way to store miscellaneous information associated to each node. (Yeah... comments) These comments will be saved outside of the configuration file and restored the next time the command is run. .SS "annotation( [ note1, [ note2 , ... ] ] )" .IX Subsection "annotation( [ note1, [ note2 , ... ] ] )" Without argument, return a string containing the object's annotation (or an empty string). .PP With several arguments, join the arguments with \*(L"\en\*(R", store the annotations and return the resulting string. .SS "load_pod_annotation ( pod_string )" .IX Subsection "load_pod_annotation ( pod_string )" Load annotations in configuration tree from a pod document. The pod must be in the form: .PP .Vb 1 \& =over \& \& =item path \& \& Annotation text \& \& =back .Ve .SS "clear_annotation" .IX Subsection "clear_annotation" Clear the annotation of an element .SH "Information management" .IX Header "Information management" .SS "grab(...)" .IX Subsection "grab(...)" Grab an object from the configuration tree. .PP Parameters are: .ie n .IP """step""" 4 .el .IP "\f(CWstep\fR" 4 .IX Item "step" A string indicating the steps to follow in the tree to find the required item. (mandatory) .ie n .IP """mode""" 4 .el .IP "\f(CWmode\fR" 4 .IX Item "mode" When set to \f(CW\*(C`strict\*(C'\fR, \f(CW\*(C`grab\*(C'\fR will throw an exception if no object is found using the passed string. When set to \f(CW\*(C`adaptative\*(C'\fR, the object found at last will be returned. For instance, for the step \f(CW\*(C`good_step wrong_step\*(C'\fR, only the object held by \f(CW\*(C`good_step\*(C'\fR will be returned. When set to \f(CW\*(C`loose\*(C'\fR, grab will return undef in case of problem. (default is \f(CW\*(C`strict\*(C'\fR) .ie n .IP """type""" 4 .el .IP "\f(CWtype\fR" 4 .IX Item "type" Either \f(CW\*(C`node\*(C'\fR, \f(CW\*(C`leaf\*(C'\fR, \f(CW\*(C`hash\*(C'\fR or \f(CW\*(C`list\*(C'\fR. Returns only an object of requested type. Depending on \f(CW\*(C`strict\*(C'\fR value, \f(CW\*(C`grab\*(C'\fR will either throw an exception or return the last found object of requested type. (optional, default to \f(CW\*(C`undef\*(C'\fR, which means any type of object) .ie n .IP """autoadd""" 4 .el .IP "\f(CWautoadd\fR" 4 .IX Item "autoadd" When set to 1, \f(CW\*(C`hash\*(C'\fR or \f(CW\*(C`list\*(C'\fR configuration element are created when requested by the passed steps. (default is 1). .IP "grab_non_available" 4 .IX Item "grab_non_available" When set to 1, grab will return an object even if this one is not available. I.e. even if this element was warped out. (default is 0). .PP The \f(CW\*(C`step\*(C'\fR parameters is made of the following items separated by spaces: .IP "\-" 8 Go up one node .IP "!" 8 Go to the root node. .IP "!Foo" 8 .IX Item "!Foo" Go up the configuration tree until the \f(CW\*(C`Foo\*(C'\fR configuration class is found. Raise an exception if no \f(CW\*(C`Foo\*(C'\fR class is found when root node is reached. .IP "xxx" 8 .IX Item "xxx" Go down using \f(CW\*(C`xxx\*(C'\fR element. .IP "xxx:yy" 8 .IX Item "xxx:yy" Go down using \f(CW\*(C`xxx\*(C'\fR element and id \f(CW\*(C`yy\*(C'\fR (valid for hash or list elements) .IP "?xxx" 8 .IX Item "?xxx" Go up the tree until a node containing element \f(CW\*(C`xxx\*(C'\fR is found. Then go down the tree like item \f(CW\*(C`xxx\*(C'\fR. .Sp If \f(CW\*(C`?xxx:yy\*(C'\fR, go up the tree the same way. But no check is done to see if id \f(CW\*(C`yy\*(C'\fR actually exists or not. Only the element \f(CW\*(C`xxx\*(C'\fR is considered when going up the tree. .SS "grab_value(...)" .IX Subsection "grab_value(...)" Like \*(L"grab(...)\*(R", but will return the value of a leaf or check_list object, not just the leaf object. .PP Will raise an exception if following the steps ends on anything but a leaf or a check_list. .SS "grab_annotation(...)" .IX Subsection "grab_annotation(...)" Like \*(L"grab(...)\*(R", but will return the annotation of an object. .SS "\fIgrab_root()\fP" .IX Subsection "grab_root()" Returns the root of the configuration tree. .SS "grab_ancestor( Foo )" .IX Subsection "grab_ancestor( Foo )" Go up the configuration tree until the \f(CW\*(C`Foo\*(C'\fR configuration class is found. Returns the found node or undef. .SS "notify_change(...)" .IX Subsection "notify_change(...)" Notify the instance of semantic changes. Parameters are: .IP "old" 8 .IX Item "old" old value. .IP "new" 8 .IX Item "new" new value .IP "path" 8 .IX Item "path" Location of the changed parameter starting from root node. Default to \f(CW\*(C`$self\-\*(C'\fRlocation>. .IP "name" 8 .IX Item "name" element name. Default to \f(CW\*(C`$self\-\*(C'\fRelement_name> .IP "index" 8 .IX Item "index" If the changed parameter is part of a hash or an array, \f(CW\*(C`index\*(C'\fR contains the key or the index to get the changed parameter. .IP "msg" 8 .IX Item "msg" change message. When not empty, old and new values are not shown. .IP "note" 8 .IX Item "note" note displayed along the changed values (or message) .IP "really" 8 .IX Item "really" When set to 1, force recording of change even if in initial load phase. .IP "needs_save" 8 .IX Item "needs_save" internal parameter. .SS "model_searcher ()" .IX Subsection "model_searcher ()" Returns an object dedicated to search an element in the configuration model (respecting privilege level). .PP This method returns a Config::Model::SearchElement object. See Config::Model::Searcher for details on how to handle a search. .SS "dump_as_data ( )" .IX Subsection "dump_as_data ( )" Dumps the configuration data of the node and its siblings into a perl data structure. .PP Returns a hash ref containing the data. See Config::Model::DumpAsData for details. .SS "warp_error" .IX Subsection "warp_error" Returns a string describing any issue with Config::Model::Warper object. Returns '' if invoked on a tree object without warp specification. .SH "AUTHOR" .IX Header "AUTHOR" Dominique Dumont, (ddumont at cpan dot org) .SH "SEE ALSO" .IX Header "SEE ALSO" Config::Model, Config::Model::Instance, Config::Model::Node, Config::Model::Loader, Config::Model::Dumper .SH "AUTHOR" .IX Header "AUTHOR" Dominique Dumont .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2014 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