| Config-Tree documentation | view source | Contained in the Config-Tree distribution. |
Config::Tree::BaseFS - Base class for Config::Tree classes which access filesystem
# Moose-speak extends 'Config::Tree::BaseFS';
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.
The path to config file (for Config::Tree::File) or directory (for Config::Tree::Dir). Maybe relative or absolute path.
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.
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.
What permission mode to create new files.
What permission mode to create new directories.
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'.
If set to 1, then the file/dir must exist and an error is thrown if it doesn't.
Steven Haryanto, <stevenharyanto at gmail.com>
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.
| Config-Tree documentation | view source | Contained in the Config-Tree distribution. |