Ubic::Settings - ubic settings
my $service_dir = Ubic::Settings->service_dir; my $data_dir = Ubic::Settings->data_dir; my $default_user = Ubic::Settings->default_user; Ubic::Settings->data_dir($new_dir);
This module can be used to get common ubic settings: service_dir, data_dir and default_user.
Note that these settings are global and used by ubic core. Services don't have to use data_dir to store their data, for example; they can use any dir they want.
Settings are determined in the following order (from the most priority to the least):
Environment variables UBIC_SERVICE_DIR, UBIC_DIR and UBIC_DEFAULT_USER (which affect accordingly service_dir, data_dir and default_user);
Config file at ~/.ubic.cfg, /etc/ubic/ubic.cfg or /usr/local/etc/ubic/ubic.cfg, in this order;
If none of these settings are set, it will fail and advice to run
This is considered to be a public class. Any changes to its interface will go through a deprecation cycle.
If any of setting methods is called with new value, this value will be applied for current process only.
They also will be propagated to future child processes via environment variables.
Get or set directory with service descriptions.
Get or set directory into which ubic stores all of its data (locks, status files, tmp files).
Get or set user for services which don't specify user themselves.
Check if all settings are valid.
Will throw an exception if any configuration options are not set.
Vyacheslav Matyukhin <email@example.com>
This software is copyright (c) 2012 by Yandex LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.