Omni/Constants.pm

filter: Statementstmt 83.3% 15 / 18 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 75.0% 18 / 24 CC 1 SCAR 0.0
CC
1
Cov
73%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Omni/Base.pm ↑ Summary Omni.pm »
1 package Backup::Omni::Constants;
2  
3 1 our $VERSION = '0.01';
4  
5 1 ▶use Backup::Omni::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 use Badger::Class
8 1 ▶ version => $VERSION,
Subroutine BEGIN: called CC=1 SCAR=0.0
9 base => 'Badger::Constants', # grab the badger constants
10 import => 'class',
11 1 ;
12  
13 # ----------------------------------------------------------------------
14 # Build our constants and export them
15 # ----------------------------------------------------------------------
16  
17 {
18  
19 1 my $path = '/opt/omni/bin/%s';
20  
21 1 ▶ if ($^O eq "MSWin32") {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O eq "MSWin32") 0 1 1
22  
23 0 ▶ if ($ENV{PATH} =~ m/;(.*OmniBack\\bin);/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ENV{'PATH'} =~ /;(.*OmniBack\\bin);/) { } 0 0 0
24  
25 0 $path = $1 . '\\%s.exe';
26  
27 } else {
28  
29 0 $path = '"C:\\Program Files\\OmniBack\\bin\\%s.exe"';
30  
31 }
32  
33 }
34  
35 1 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 1 my $exports = {
43 any => 'OMNIR OMNIDB OMNISTAT OMNIABORT',
44 all => 'OMNIR OMNIDB OMNISTAT OMNIABORT',
45 };
46  
47 1 class->constant($constants);
48 1 class->exports($exports);
49  
50 }
51  
52 1 1;
53  
54 __END__
« Omni/Base.pm ↑ Summary Omni.pm »