line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OTRS::OPM::Installer::Utils::OTRS::OTRS3; |
2
|
|
|
|
|
|
|
$OTRS::OPM::Installer::Utils::OTRS::OTRS3::VERSION = '0.05'; |
3
|
|
|
|
|
|
|
# ABSTRACT: helper functions for OTRS3 |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
308
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub _get_db { |
9
|
1
|
|
|
1
|
|
2
|
my ($self) = @_; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
|
|
22
|
return $self->manager->{DBObject}; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _build_manager { |
15
|
1
|
|
|
1
|
|
3
|
my ($self) = @_; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
2
|
push @INC, @{ $self->inc }; |
|
1
|
|
|
|
|
26
|
|
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
10
|
my $manager; |
20
|
1
|
50
|
|
|
|
3
|
eval { |
21
|
1
|
|
|
|
|
890
|
require Kernel::Config; |
22
|
1
|
|
|
|
|
184
|
require Kernel::System::Main; |
23
|
1
|
|
|
|
|
4
|
require Kernel::System::Encode; |
24
|
1
|
|
|
|
|
3
|
require Kernel::System::Log; |
25
|
1
|
|
|
|
|
3
|
require Kernel::System::DB; |
26
|
1
|
|
|
|
|
3
|
require Kernel::System::Time; |
27
|
1
|
|
|
|
|
3
|
require Kernel::System::Package; |
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
|
|
5
|
my %objects = ( ConfigObject => Kernel::Config->new ); |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
7
|
for my $module (qw/Main Encode Log DB Time Package/) { |
32
|
6
|
|
|
|
|
41
|
my $class = 'Kernel::System::' . $module; |
33
|
6
|
|
|
|
|
24
|
$objects{$module . 'Object'} = $class->new( %objects ); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
1
|
|
|
|
|
15
|
$manager = $objects{PackageObject}; |
37
|
|
|
|
|
|
|
} or die $@; |
38
|
|
|
|
|
|
|
|
39
|
1
|
|
|
|
|
15
|
$manager; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |