| Config::Model::Dumper - Serialize data of config tree |
Config::Model::Dumper - Serialize data of config tree
use Config::Model ;
# create your config model my $model = Config::Model -> new ; $model->create_config_class( ... ) ;
# create instance my $inst = $model->instance (root_class_name => 'FooBar', instance_name => 'test1');
# create root of config my $root = $inst -> config_root ;
# put some data in config tree my $step = 'std_id:ab X=Bv - std_id:bc X=Av - a_string="toto tata"'; $root->walk( step => $step ) ;
# dump only customized data (audit mode) print $root->dump_tree;
# dump all data including default values print $root->dump_tree( full_dump => 1 ) ;
This module is used directly by the Config::Model::Node manpage to serialize configuration data in a compact (but readable) string.
The serialisation can be done in standard mode where only customized values are dumped in the string. I.e. only data modified by the user are dumped.
The other mode is full_dump mode where all all data, including
default values, are dumped.
The serialized string can be used by the Config::Model::Walker manpage to store the data back into a configuration tree.
No parameter. The constructor should be used only by the Config::Model::Node manpage.
Return a string that contains a dump of the object tree with all the values. This string follows the convention defined by the Config::Model::Walker manpage.
The serialized string can be used by the Config::Model::Walker manpage to store the data back into a configuration tree.
Parameters are:
full will dump all configuration data including default
values.
preset will dump only value entered in preset mode.
By default, the dump contains only data modified by the user (i.e. data differ from default or preset values).
Reference to the the Config::Model::Node manpage object that is dumped. All nodes and leaves attached to this node are also dumped.
Skip node that have a cds write capabality in their model. See
the Config::Model::AutoRead manpage.
Dominique Dumont, (ddumont at cpan dot org)
the Config::Model manpage,the Config::Model::Node manpage,the Config::Model::Walker manpage
| Config::Model::Dumper - Serialize data of config tree |