line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OPM::Maker::Utils::OTRS4; |
2
|
|
|
|
|
|
|
$OPM::Maker::Utils::OTRS4::VERSION = '1.2.0'; |
3
|
|
|
|
|
|
|
# ABSTRACT: helper functions for ((OTRS)) Community Edition >= 4 |
4
|
|
|
|
|
|
|
|
5
|
33
|
|
|
33
|
|
1173
|
use strict; |
|
33
|
|
|
|
|
1008
|
|
|
33
|
|
|
|
|
1955
|
|
6
|
33
|
|
|
33
|
|
181
|
use warnings; |
|
33
|
|
|
|
|
1870
|
|
|
33
|
|
|
|
|
1847
|
|
7
|
|
|
|
|
|
|
|
8
|
33
|
|
|
33
|
|
181
|
use List::Util qw(first); |
|
33
|
|
|
|
|
68
|
|
|
33
|
|
|
|
|
4181
|
|
9
|
33
|
|
|
33
|
|
1132
|
use Carp; |
|
33
|
|
|
|
|
71
|
|
|
33
|
|
|
|
|
11130
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub packagesetup { |
12
|
21
|
|
|
21
|
1
|
94
|
my ($class, $type, $version, $function, $runtype, $package) = @_; |
13
|
|
|
|
|
|
|
|
14
|
21
|
100
|
|
|
|
59
|
$version = $version ? ' Version="' . $version . '"' : ''; |
15
|
|
|
|
|
|
|
|
16
|
21
|
|
100
|
|
|
89
|
$runtype //= 'post'; |
17
|
|
|
|
|
|
|
|
18
|
21
|
100
|
|
|
|
43
|
if ( $package ) { |
19
|
2
|
|
|
|
|
50
|
$package = sprintf "'%s'", $package; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
else { |
22
|
19
|
|
|
|
|
26
|
$package = '$Param{Structure}->{Name}->{Content}'; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
21
|
|
|
|
|
142
|
return qq~ <$type Type="$runtype"$version>
|
26
|
|
|
|
|
|
|
\$Kernel::OM->Get('var::packagesetup::' . $package )->$function(); |
27
|
|
|
|
|
|
|
]]>$type>~; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub filecheck { |
31
|
13
|
|
|
13
|
1
|
34
|
my ($class, $files) = @_; |
32
|
|
|
|
|
|
|
|
33
|
13
|
100
|
|
46
|
|
55
|
if ( first{ $_ =~ m{Kernel/Output/HTML/[^/]+/.*?\.dtl\z} }@{$files} ) { |
|
46
|
|
|
|
|
97
|
|
|
13
|
|
|
|
|
64
|
|
34
|
1
|
|
|
|
|
136
|
carp "The old template engine was replaced with Template::Toolkit. Please use bin/otrs.MigrateDTLToTT.pl.\n"; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
13
|
|
|
|
|
95
|
return 1; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |