Config::Tree::Var - Read configuration tree from Perl data structure


Config-Tree documentation  | view source Contained in the Config-Tree distribution.

Index


NAME

Top

Config::Tree::Var - Read configuration tree from Perl data structure

SYNOPSIS

Top

 use Config::Tree::Var;

 my $tree = {
    foo => {
        bar => 2,
        baz => 3,
    }
 };

 my $conf = Config::Tree::Var->new(
     tree => $var,
     # schema => ...,
     # when_invalid => ...
     # include_path_re => qr/.../,
     # exclude_path_re => qr/.../,
     ro => 0,
 );
 my $val = $conf->get('/foo/bar'); # 2
 $conf->cd('/foo');
 $conf->set('bar', 10); # same as set('/foo/bar', 10);

DESCRIPTION

Top

ATTRIBUTES

Top

METHODS

Top

new(%args)

Construct a new Config::Tree::Var object. Arguments.

set($path, $val)

Set config variable in the tree.

save()

Does nothing. set() will already modify the Perl data structure.

SEE ALSO

Top

Data::Schema, Config::Tree::Base

AUTHOR

Top

Steven Haryanto, <stevenharyanto at gmail.com>

COPYRIGHT & LICENSE

Top


Config-Tree documentation  | view source Contained in the Config-Tree distribution.