The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Config::AST::Root - root of the abstract syntax tree

DESCRIPTION

An auxiliary class representing the root of the abstract syntax tree. It is necessary because the tree itself forms a circular structure (due to the root attribute of Config::AST::Node::Section). Without this intermediate class (if root pointed to Config::AST itself), the structure would have never been destroyed, because each element would remain referenced at least once.

CONSTRUCTOR

$obj = new($ci)

$ci is one to enable case-insensitive keyword lookup, and 0 otherwise.

METHODS

$s = $r->mangle_key($name)

Converts the string $name to a form suitable for lookups, in accordance with the _ci attribute.

$r->reset

Destroys the underlying syntax tree.

$t = $r->tree

Returns the root node of the tree, initializing it if necessary.

$bool = $r->empty

Returns true if the tree is empty.

SEE ALSO

Config::AST.