NAME
Config::Tree::BaseFS - Base class for Config::Tree classes which access filesystem
SYNOPSIS
# Moose-speak
extends 'Config::Tree::BaseFS';
DESCRIPTION
This base class provides some (mostly internal) methods which deals with reading/writing files/directories.
Currently Config::Tree::File and Config::Tree::Dir derive from this class.
ATTRIBUTES
path (rw)
The path to config file (for Config::Tree::File) or directory (for Config::Tree::Dir). Maybe relative or absolute path.
allow_symlink (rw, default 0)
Whether to allow symlinks. Possible values are 0 (does not allow symlinks at all), 1 (allow symlinks if owner matches), 2 (allow symlinks). Default is 1. Due to symlink attack issue, make sure you know exactly what you are doing if you turn this to 2 if you read other user's files/directories.
allow_different_owner (rw, default 0)
Whether to allow writing to files/directories which have different owner as the running user. By default this is 0, to protect root from writing to user-controlled directories. Although this module uses safe writing to avoid symlink attacks (when allow_symlink is 0/1 anyway), due to other issues, it is not recommended for root to write to user-controlled directories. Make sure you know exactly what you are doing if you turn this on.
file_mode (rw, default 0644)
What permission mode to create new files.
dir_mode (rw, default 0755)
What permission mode to create new directories.
yaml_module (ro, default 'YAML::XS')
Which YAML module to use. Default is 'YAML::XS', but will fall back to 'YAML' (YAML.pm) if the first is unavailable. You can use either 'YAML::XS', 'YAML', 'YAML::Syck', or 'YAML::Tiny'.
METHODS
SEE ALSO
Config::Tree::Base, Config::Tree::File, Config::Tree::Dir
AUTHOR
Steven Haryanto, <stevenharyanto at gmail.com>
COPYRIGHT & LICENSE
Copyright 2009 Steven Haryanto, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.