Ricardo SIGNES 😄


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);


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.



This method loads the given filename as YAML, croaks if it contains more than one section, and otherwise returns the contained data.


This method returns the entire tree of data (returned by the data method), serialized into YAML.

$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>


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.


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.