line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
37
|
|
|
37
|
|
735
|
use strict; |
|
37
|
|
|
|
|
92
|
|
|
37
|
|
|
|
|
1024
|
|
2
|
37
|
|
|
37
|
|
186
|
use warnings; |
|
37
|
|
|
|
|
165
|
|
|
37
|
|
|
|
|
2451
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::Cmp 1.203; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use overload |
7
|
37
|
|
|
|
|
375
|
'&' => \&make_all, |
8
|
|
|
|
|
|
|
'|' => \&make_any, |
9
|
|
|
|
|
|
|
'""' => \&string, |
10
|
|
|
|
|
|
|
fallback => 1, |
11
|
37
|
|
|
37
|
|
208
|
; |
|
37
|
|
|
|
|
65
|
|
12
|
|
|
|
|
|
|
|
13
|
37
|
|
|
37
|
|
3491
|
use Scalar::Util (); |
|
37
|
|
|
|
|
82
|
|
|
37
|
|
|
|
|
2714
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub import |
16
|
|
|
|
|
|
|
{ |
17
|
269
|
|
|
269
|
|
591
|
my $pkg = shift; |
18
|
|
|
|
|
|
|
|
19
|
269
|
|
|
|
|
651
|
my $callpkg = caller(); |
20
|
269
|
50
|
|
|
|
1388
|
if ($callpkg =~ /^Test::Deep::/) |
21
|
|
|
|
|
|
|
{ |
22
|
37
|
|
|
37
|
|
240
|
no strict 'refs'; |
|
37
|
|
|
|
|
86
|
|
|
37
|
|
|
|
|
16282
|
|
23
|
|
|
|
|
|
|
|
24
|
269
|
|
|
|
|
422
|
push @{$callpkg."::ISA"}, $pkg; |
|
269
|
|
|
|
|
42717
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new |
29
|
|
|
|
|
|
|
{ |
30
|
2199
|
|
|
2199
|
0
|
3644
|
my $pkg = shift; |
31
|
|
|
|
|
|
|
|
32
|
2199
|
|
|
|
|
3908
|
my $self = bless {}, $pkg; |
33
|
|
|
|
|
|
|
|
34
|
2199
|
|
|
|
|
6333
|
$self->init(@_); |
35
|
2199
|
|
|
|
|
6191
|
return $self; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub init |
39
|
|
|
|
1
|
0
|
|
{ |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub make_all |
43
|
|
|
|
|
|
|
{ |
44
|
4
|
|
|
4
|
0
|
8
|
my ($e1, $e2) = @_; |
45
|
|
|
|
|
|
|
|
46
|
4
|
|
|
|
|
10
|
return Test::Deep::all($e1, $e2); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub make_any |
50
|
|
|
|
|
|
|
{ |
51
|
6
|
|
|
6
|
0
|
16
|
my ($e1, $e2) = @_; |
52
|
|
|
|
|
|
|
|
53
|
6
|
|
|
|
|
17
|
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
|
436
|
my $self = shift; |
68
|
|
|
|
|
|
|
|
69
|
129
|
|
|
|
|
278
|
return overload::StrVal($self); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub render_stack |
73
|
|
|
|
|
|
|
{ |
74
|
186
|
|
|
186
|
0
|
302
|
my $self = shift; |
75
|
186
|
|
|
|
|
302
|
my $var = shift; |
76
|
|
|
|
|
|
|
|
77
|
186
|
|
|
|
|
379
|
return $var; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub renderExp |
81
|
|
|
|
|
|
|
{ |
82
|
62
|
|
|
62
|
0
|
123
|
my $self = shift; |
83
|
|
|
|
|
|
|
|
84
|
62
|
|
|
|
|
158
|
return $self->renderGot($self->{val}); |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub renderGot |
88
|
|
|
|
|
|
|
{ |
89
|
124
|
|
|
124
|
0
|
193
|
my $self = shift; |
90
|
|
|
|
|
|
|
|
91
|
124
|
|
|
|
|
328
|
return Test::Deep::render_val(@_); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub reset_arrow |
95
|
|
|
|
|
|
|
{ |
96
|
184
|
|
|
184
|
0
|
642
|
return 1; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub data |
100
|
|
|
|
|
|
|
{ |
101
|
348
|
|
|
348
|
0
|
514
|
my $self = shift; |
102
|
|
|
|
|
|
|
|
103
|
348
|
|
|
|
|
836
|
return $Test::Deep::Stack->getLast; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
1; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
__END__ |