line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Backup::Omni::Constants; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1513
|
use Backup::Omni::Exception; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Badger::Class |
8
|
1
|
|
|
|
|
6
|
version => $VERSION, |
9
|
|
|
|
|
|
|
base => 'Badger::Constants', # grab the badger constants |
10
|
|
|
|
|
|
|
import => 'class', |
11
|
1
|
|
|
1
|
|
83
|
; |
|
1
|
|
|
|
|
1
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- |
14
|
|
|
|
|
|
|
# Build our constants and export them |
15
|
|
|
|
|
|
|
# ---------------------------------------------------------------------- |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
{ |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
my $path = '/opt/omni/bin/%s'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
if ($^O eq "MSWin32") { |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
if ($ENV{PATH} =~ m/;(.*OmniBack\\bin);/) { |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
$path = $1 . '\\%s.exe'; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} else { |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$path = '"C:\\Program Files\\OmniBack\\bin\\%s.exe"'; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $constants = { |
36
|
|
|
|
|
|
|
OMNIR => sprintf($path, 'omnir'), |
37
|
|
|
|
|
|
|
OMNIDB => sprintf($path, 'omnidb'), |
38
|
|
|
|
|
|
|
OMNISTAT => sprintf($path, 'omnistat'), |
39
|
|
|
|
|
|
|
OMNIABORT => sprintf($path, 'omniabort'), |
40
|
|
|
|
|
|
|
}; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
my $exports = { |
43
|
|
|
|
|
|
|
any => 'OMNIR OMNIDB OMNISTAT OMNIABORT', |
44
|
|
|
|
|
|
|
all => 'OMNIR OMNIDB OMNISTAT OMNIABORT', |
45
|
|
|
|
|
|
|
}; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
class->constant($constants); |
48
|
|
|
|
|
|
|
class->exports($exports); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |