line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Woothee::Util; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
40
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
167
|
|
4
|
6
|
|
|
6
|
|
28
|
use warnings; |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
126
|
|
5
|
6
|
|
|
6
|
|
24
|
use Carp; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
270
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
32
|
use Woothee::DataSet; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
544
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = "v1.10.0"; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our (@ISA, @EXPORT_OK); |
12
|
|
|
|
|
|
|
BEGIN { |
13
|
6
|
|
|
6
|
|
38
|
require Exporter; |
14
|
6
|
|
|
|
|
96
|
our @ISA = qw(Exporter); |
15
|
6
|
|
|
|
|
1813
|
our @EXPORT_OK = qw(update_map update_category update_version update_os update_os_version); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub update_map { |
19
|
867
|
|
|
867
|
0
|
1511
|
my ($target,$source) = @_; |
20
|
867
|
|
|
|
|
2927
|
foreach my $key (%$source) { |
21
|
8436
|
100
|
100
|
|
|
16111
|
next if $key eq Woothee::DataSet->const('KEY_LABEL') or $key eq Woothee::DataSet->const('KEY_TYPE'); |
22
|
6702
|
100
|
100
|
|
|
18049
|
if (defined($source->{$key}) and length($source->{$key}) > 0) { |
23
|
1944
|
|
|
|
|
4140
|
$target->{$key} = $source->{$key}; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub update_category { |
29
|
273
|
|
|
273
|
0
|
576
|
my ($target,$category) = @_; |
30
|
273
|
|
|
|
|
548
|
$target->{Woothee::DataSet->const('ATTRIBUTE_CATEGORY')} = $category; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub update_version { |
34
|
393
|
|
|
393
|
0
|
784
|
my ($target,$version) = @_; |
35
|
393
|
|
|
|
|
868
|
$target->{Woothee::DataSet->const('ATTRIBUTE_VERSION')} = $version; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub update_os { |
39
|
273
|
|
|
273
|
0
|
479
|
my ($target,$os) = @_; |
40
|
273
|
|
|
|
|
550
|
$target->{Woothee::DataSet->const('ATTRIBUTE_OS')} = $os; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub update_os_version { |
44
|
216
|
|
|
216
|
0
|
402
|
my ($target,$os_version) = @_; |
45
|
216
|
|
|
|
|
490
|
$target->{Woothee::DataSet->const('ATTRIBUTE_OS_VERSION')} = $os_version; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |