Vyacheslav Matyukhin > Ubic-1.54 > Ubic::Settings

Download:
Ubic-1.54.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 1.54   Source   Latest Release: Ubic-1.57

NAME ^

Ubic::Settings - ubic settings

VERSION ^

version 1.54

SYNOPSIS ^

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

DESCRIPTION ^

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

METHODS ^

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.

service_dir()
service_dir($dir)

Get or set directory with service descriptions.

data_dir()
data_dir($dir)

Get or set directory into which ubic stores all of its data (locks, status files, tmp files).

default_user()
default_user($user)

Get or set user for services which don't specify user themselves.

check_settings()

Check if all settings are valid.

Will throw an exception if any configuration options are not set.

AUTHOR ^

Vyacheslav Matyukhin <mmcleric@yandex-team.ru>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 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.

syntax highlighting: