line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Compare::Plugins::JSON; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
66616
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
76
|
|
4
|
3
|
|
|
3
|
|
13
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
85
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
836
|
use Data::Compare qw(Compare); |
|
3
|
|
|
|
|
16483
|
|
|
3
|
|
|
|
|
20
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.04'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _compare_object_and_object { |
13
|
4
|
100
|
|
4
|
|
2188
|
return $_[0] eq $_[1] ? 1 : 0; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _compare_object_and_scalar { |
17
|
4
|
50
|
|
4
|
|
1852
|
return Compare(${$_[0]}, $_[1]) if ref($_[0]); |
|
4
|
|
|
|
|
25
|
|
18
|
0
|
|
|
|
|
|
return Compare($_[0], ${$_[1]}); |
|
0
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
[ |
23
|
|
|
|
|
|
|
['JSON::PP::Boolean', \&_compare_object_and_object], |
24
|
|
|
|
|
|
|
['JSON::PP::Boolean', '', \&_compare_object_and_scalar], |
25
|
|
|
|
|
|
|
['JSON::XS::Boolean', \&_compare_object_and_object], |
26
|
|
|
|
|
|
|
['JSON::XS::Boolean', '', \&_compare_object_and_scalar], |
27
|
|
|
|
|
|
|
['JSON::backportPP::Boolean', \&_compare_object_and_object], |
28
|
|
|
|
|
|
|
['JSON::backportPP::Boolean', '', \&_compare_object_and_scalar], |
29
|
|
|
|
|
|
|
]; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |