Tree::File::YAML - (DEPRECATED) store a data structure in a file tree (using YAML)
version 0.112
use Tree::File::YAML; my $tree = Tree::File::YAML->new($treerot); die "death mandated" if $tree->get("/master/die") print "Hello, ", $tree->get("/login/user/name"); $tree->set("/login/user/lastlogin", time); $tree->write;
This module stores configuration in a series of YAML files spread across a directory tree, and provides uniform access to the data structure.
It can load a single YAML file or a directory tree containing YAML files as leaves. The tree's branches can be returned as data structures or YAML documents, and the tree can be modified and rewritten. Directory-based branches can be collapsed back into files and file-based branches can be exploded into directories.
For more information, see Tree::File.
$tree->load_file($filename)
This method loads the given filename as YAML, croaks if it contains more than one section, and otherwise returns the contained data.
$tree->as_yaml()
This method returns the entire tree of data (returned by the data method), serialized into YAML.
data
$tree->write_file($filename, $data)
This method writes the given data, as YAML, to the given filename.
symlinks and references
Ricardo SIGNES, <rjbs@cpan.org>
<rjbs@cpan.org>
Please report any bugs or feature requests to bug-tree-file@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-tree-file@rt.cpan.org
Copyright 2005 Ricardo Signes, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Tree::File, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tree::File
CPAN shell
perl -MCPAN -e shell install Tree::File
For more information on module installation, please visit the detailed CPAN module installation guide.