line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
36
|
|
|
36
|
|
239
|
use strict; |
|
36
|
|
|
|
|
101
|
|
|
36
|
|
|
|
|
1077
|
|
2
|
36
|
|
|
36
|
|
172
|
use warnings; |
|
36
|
|
|
|
|
637
|
|
|
36
|
|
|
|
|
2343
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::Cmp 1.202; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use overload |
7
|
36
|
|
|
|
|
415
|
'&' => \&make_all, |
8
|
|
|
|
|
|
|
'|' => \&make_any, |
9
|
|
|
|
|
|
|
'""' => \&string, |
10
|
|
|
|
|
|
|
fallback => 1, |
11
|
36
|
|
|
36
|
|
210
|
; |
|
36
|
|
|
|
|
66
|
|
12
|
|
|
|
|
|
|
|
13
|
36
|
|
|
36
|
|
3473
|
use Scalar::Util (); |
|
36
|
|
|
|
|
76
|
|
|
36
|
|
|
|
|
2708
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub import |
16
|
|
|
|
|
|
|
{ |
17
|
261
|
|
|
261
|
|
564
|
my $pkg = shift; |
18
|
|
|
|
|
|
|
|
19
|
261
|
|
|
|
|
535
|
my $callpkg = caller(); |
20
|
261
|
50
|
|
|
|
1391
|
if ($callpkg =~ /^Test::Deep::/) |
21
|
|
|
|
|
|
|
{ |
22
|
36
|
|
|
36
|
|
235
|
no strict 'refs'; |
|
36
|
|
|
|
|
72
|
|
|
36
|
|
|
|
|
15487
|
|
23
|
|
|
|
|
|
|
|
24
|
261
|
|
|
|
|
417
|
push @{$callpkg."::ISA"}, $pkg; |
|
261
|
|
|
|
|
40614
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new |
29
|
|
|
|
|
|
|
{ |
30
|
2199
|
|
|
2199
|
0
|
3501
|
my $pkg = shift; |
31
|
|
|
|
|
|
|
|
32
|
2199
|
|
|
|
|
3827
|
my $self = bless {}, $pkg; |
33
|
|
|
|
|
|
|
|
34
|
2199
|
|
|
|
|
6321
|
$self->init(@_); |
35
|
2199
|
|
|
|
|
6303
|
return $self; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub init |
39
|
|
|
|
1
|
0
|
|
{ |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub make_all |
43
|
|
|
|
|
|
|
{ |
44
|
4
|
|
|
4
|
0
|
11
|
my ($e1, $e2) = @_; |
45
|
|
|
|
|
|
|
|
46
|
4
|
|
|
|
|
10
|
return Test::Deep::all($e1, $e2); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub make_any |
50
|
|
|
|
|
|
|
{ |
51
|
6
|
|
|
6
|
0
|
14
|
my ($e1, $e2) = @_; |
52
|
|
|
|
|
|
|
|
53
|
6
|
|
|
|
|
18
|
return Test::Deep::any($e1, $e2); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub cmp |
57
|
|
|
|
|
|
|
{ |
58
|
0
|
|
|
0
|
0
|
0
|
my ($a1, $a2, $rev) = @_; |
59
|
|
|
|
|
|
|
|
60
|
0
|
0
|
|
|
|
0
|
($a1, $a2) = ($a2, $a1) if $rev; |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
0
|
return (overload::StrVal($a1) cmp overload::StrVal($a2)); |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub string |
66
|
|
|
|
|
|
|
{ |
67
|
129
|
|
|
129
|
0
|
433
|
my $self = shift; |
68
|
|
|
|
|
|
|
|
69
|
129
|
|
|
|
|
272
|
return overload::StrVal($self); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub render_stack |
73
|
|
|
|
|
|
|
{ |
74
|
186
|
|
|
186
|
0
|
322
|
my $self = shift; |
75
|
186
|
|
|
|
|
296
|
my $var = shift; |
76
|
|
|
|
|
|
|
|
77
|
186
|
|
|
|
|
409
|
return $var; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub renderExp |
81
|
|
|
|
|
|
|
{ |
82
|
62
|
|
|
62
|
0
|
148
|
my $self = shift; |
83
|
|
|
|
|
|
|
|
84
|
62
|
|
|
|
|
149
|
return $self->renderGot($self->{val}); |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub renderGot |
88
|
|
|
|
|
|
|
{ |
89
|
124
|
|
|
124
|
0
|
224
|
my $self = shift; |
90
|
|
|
|
|
|
|
|
91
|
124
|
|
|
|
|
335
|
return Test::Deep::render_val(@_); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub reset_arrow |
95
|
|
|
|
|
|
|
{ |
96
|
184
|
|
|
184
|
0
|
602
|
return 1; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub data |
100
|
|
|
|
|
|
|
{ |
101
|
346
|
|
|
346
|
0
|
542
|
my $self = shift; |
102
|
|
|
|
|
|
|
|
103
|
346
|
|
|
|
|
773
|
return $Test::Deep::Stack->getLast; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
1; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
__END__ |