line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#################################################################### |
2
|
|
|
|
|
|
|
#### This is an automatically generated file -- do not edit it ##### |
3
|
|
|
|
|
|
|
############ Re-install XAO::Base package to update it ############# |
4
|
|
|
|
|
|
|
#################################################################### |
5
|
|
|
|
|
|
|
package XAO::BaseConfig; |
6
|
8
|
|
|
8
|
|
55
|
use strict; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
292
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# Nothing here. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package XAO::Base; |
11
|
8
|
|
|
8
|
|
44
|
use strict; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
169
|
|
12
|
8
|
|
|
8
|
|
40
|
use XAO::Errors qw(XAO::BaseConfig); |
|
8
|
|
|
|
|
12
|
|
|
8
|
|
|
|
|
51
|
|
13
|
|
|
|
|
|
|
require Exporter; |
14
|
|
|
|
|
|
|
|
15
|
8
|
|
|
|
|
2062
|
use vars qw(@ISA @EXPORT_OK @EXPORT $VERSION |
16
|
8
|
|
|
8
|
|
53
|
$homedir $projectsdir $xao_base_version); |
|
8
|
|
|
|
|
23
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
@ISA=qw(Exporter); |
19
|
|
|
|
|
|
|
@EXPORT_OK=qw($homedir $projectsdir $xao_base_version); |
20
|
|
|
|
|
|
|
@EXPORT=(); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
## |
23
|
|
|
|
|
|
|
# XAO::BaseConfig package version |
24
|
|
|
|
|
|
|
# |
25
|
|
|
|
|
|
|
$xao_base_version='1.27'; |
26
|
|
|
|
|
|
|
$VERSION='1.27'; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
## |
29
|
|
|
|
|
|
|
# Home directory of XAO |
30
|
|
|
|
|
|
|
# |
31
|
|
|
|
|
|
|
$homedir='/opt/xao'; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
## |
34
|
|
|
|
|
|
|
# Root directory for all projects |
35
|
|
|
|
|
|
|
# |
36
|
|
|
|
|
|
|
$projectsdir='/opt/xao/projects'; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
## |
39
|
|
|
|
|
|
|
# Setting root to something else. Useful for tests and not recommended |
40
|
|
|
|
|
|
|
# for use in normal lifecycle. |
41
|
|
|
|
|
|
|
# |
42
|
|
|
|
|
|
|
sub set_root ($) { |
43
|
27
|
|
50
|
27
|
0
|
303
|
my $dir=shift || ''; |
44
|
27
|
50
|
|
|
|
916
|
$dir=~/^\// || |
45
|
|
|
|
|
|
|
throw XAO::E::BaseConfig "set_root - $dir must be an absolute path"; |
46
|
27
|
50
|
|
|
|
460
|
-d $dir || |
47
|
|
|
|
|
|
|
throw XAO::E::BaseConfig "set_root - directory $dir does not exists"; |
48
|
27
|
|
|
|
|
264
|
$homedir=$dir; |
49
|
27
|
|
|
|
|
229
|
$projectsdir=$homedir . '/projects'; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
############################################################################### |
53
|
|
|
|
|
|
|
1; |