line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Eixo::Base::Utf8; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
796
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
254
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub enable_flag{ |
6
|
0
|
|
|
0
|
0
|
|
_flag($_[0], 1) |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub disable_flag{ |
10
|
0
|
|
|
0
|
0
|
|
_flag($_[0], 0) |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _flag{ |
14
|
0
|
|
|
0
|
|
|
my ($data, $enable) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
0
|
|
|
|
|
if(ref($data) eq 'HASH'){ |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
map { |
19
|
0
|
0
|
|
|
|
|
if(ref($_)){ |
|
0
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
_flag($_, $enable) |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
else{ |
23
|
0
|
|
|
|
|
|
_flag(\$_, $enable) |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
%$data; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
elsif(ref($data) eq 'ARRAY'){ |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
map{ |
31
|
0
|
0
|
|
|
|
|
if(ref($_)){ |
|
0
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
_flag($_, $enable) |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
else{ |
35
|
0
|
|
|
|
|
|
_flag(\$_, $enable) |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
}@$data |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
elsif(ref($data) eq 'SCALAR'){ |
41
|
|
|
|
|
|
|
|
42
|
0
|
0
|
|
|
|
|
return unless(defined($$data)); |
43
|
|
|
|
|
|
|
|
44
|
0
|
0
|
|
|
|
|
($enable)? |
45
|
|
|
|
|
|
|
utf8::upgrade($$data) : |
46
|
|
|
|
|
|
|
utf8::downgrade($$data) |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
elsif(!ref($data)){ |
49
|
0
|
0
|
|
|
|
|
return unless(defined($data)); |
50
|
|
|
|
|
|
|
|
51
|
0
|
0
|
|
|
|
|
($enable)? |
52
|
|
|
|
|
|
|
utf8::upgrade($data) : |
53
|
|
|
|
|
|
|
utf8::downgrade($data) |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
else{ |
56
|
|
|
|
|
|
|
# no hace nada en otro tipo de refs |
57
|
0
|
|
|
|
|
|
return undef; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; |