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
|
|
54
|
use strict; |
|
8
|
|
|
|
|
17
|
|
|
8
|
|
|
|
|
253
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# Nothing here. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package XAO::Base; |
11
|
8
|
|
|
8
|
|
40
|
use strict; |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
159
|
|
12
|
8
|
|
|
8
|
|
42
|
use XAO::Errors qw(XAO::BaseConfig); |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
56
|
|
13
|
|
|
|
|
|
|
require Exporter; |
14
|
|
|
|
|
|
|
|
15
|
8
|
|
|
|
|
1945
|
use vars qw(@ISA @EXPORT_OK @EXPORT $VERSION |
16
|
8
|
|
|
8
|
|
50
|
$homedir $projectsdir $xao_base_version); |
|
8
|
|
|
|
|
17
|
|
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.25'; |
26
|
|
|
|
|
|
|
$VERSION='1.25'; |
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
|
297
|
my $dir=shift || ''; |
44
|
27
|
50
|
|
|
|
548
|
$dir=~/^\// || |
45
|
|
|
|
|
|
|
throw XAO::E::BaseConfig "set_root - $dir must be an absolute path"; |
46
|
27
|
50
|
|
|
|
432
|
-d $dir || |
47
|
|
|
|
|
|
|
throw XAO::E::BaseConfig "set_root - directory $dir does not exists"; |
48
|
27
|
|
|
|
|
237
|
$homedir=$dir; |
49
|
27
|
|
|
|
|
245
|
$projectsdir=$homedir . '/projects'; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
############################################################################### |
53
|
|
|
|
|
|
|
1; |