line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
37
|
|
|
37
|
|
721
|
use strict; |
|
37
|
|
|
|
|
78
|
|
|
37
|
|
|
|
|
1056
|
|
2
|
37
|
|
|
37
|
|
191
|
use warnings; |
|
37
|
|
|
|
|
159
|
|
|
37
|
|
|
|
|
2355
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::Cmp 1.204; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use overload |
7
|
37
|
|
|
|
|
373
|
'&' => \&make_all, |
8
|
|
|
|
|
|
|
'|' => \&make_any, |
9
|
|
|
|
|
|
|
'""' => \&string, |
10
|
|
|
|
|
|
|
fallback => 1, |
11
|
37
|
|
|
37
|
|
212
|
; |
|
37
|
|
|
|
|
75
|
|
12
|
|
|
|
|
|
|
|
13
|
37
|
|
|
37
|
|
3568
|
use Scalar::Util (); |
|
37
|
|
|
|
|
86
|
|
|
37
|
|
|
|
|
2812
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub import |
16
|
|
|
|
|
|
|
{ |
17
|
269
|
|
|
269
|
|
673
|
my $pkg = shift; |
18
|
|
|
|
|
|
|
|
19
|
269
|
|
|
|
|
550
|
my $callpkg = caller(); |
20
|
269
|
50
|
|
|
|
1428
|
if ($callpkg =~ /^Test::Deep::/) |
21
|
|
|
|
|
|
|
{ |
22
|
37
|
|
|
37
|
|
258
|
no strict 'refs'; |
|
37
|
|
|
|
|
95
|
|
|
37
|
|
|
|
|
15988
|
|
23
|
|
|
|
|
|
|
|
24
|
269
|
|
|
|
|
418
|
push @{$callpkg."::ISA"}, $pkg; |
|
269
|
|
|
|
|
42851
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new |
29
|
|
|
|
|
|
|
{ |
30
|
2222
|
|
|
2222
|
0
|
3568
|
my $pkg = shift; |
31
|
|
|
|
|
|
|
|
32
|
2222
|
|
|
|
|
3921
|
my $self = bless {}, $pkg; |
33
|
|
|
|
|
|
|
|
34
|
2222
|
|
|
|
|
6545
|
$self->init(@_); |
35
|
2222
|
|
|
|
|
6140
|
return $self; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub init |
39
|
|
|
|
1
|
0
|
|
{ |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub make_all |
43
|
|
|
|
|
|
|
{ |
44
|
4
|
|
|
4
|
0
|
9
|
my ($e1, $e2) = @_; |
45
|
|
|
|
|
|
|
|
46
|
4
|
|
|
|
|
11
|
return Test::Deep::all($e1, $e2); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub make_any |
50
|
|
|
|
|
|
|
{ |
51
|
6
|
|
|
6
|
0
|
15
|
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
|
130
|
|
|
130
|
0
|
438
|
my $self = shift; |
68
|
|
|
|
|
|
|
|
69
|
130
|
|
|
|
|
267
|
return overload::StrVal($self); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub render_stack |
73
|
|
|
|
|
|
|
{ |
74
|
186
|
|
|
186
|
0
|
309
|
my $self = shift; |
75
|
186
|
|
|
|
|
297
|
my $var = shift; |
76
|
|
|
|
|
|
|
|
77
|
186
|
|
|
|
|
382
|
return $var; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub renderExp |
81
|
|
|
|
|
|
|
{ |
82
|
62
|
|
|
62
|
0
|
126
|
my $self = shift; |
83
|
|
|
|
|
|
|
|
84
|
62
|
|
|
|
|
169
|
return $self->renderGot($self->{val}); |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub renderGot |
88
|
|
|
|
|
|
|
{ |
89
|
124
|
|
|
124
|
0
|
213
|
my $self = shift; |
90
|
|
|
|
|
|
|
|
91
|
124
|
|
|
|
|
303
|
return Test::Deep::render_val(@_); |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub reset_arrow |
95
|
|
|
|
|
|
|
{ |
96
|
184
|
|
|
184
|
0
|
664
|
return 1; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub data |
100
|
|
|
|
|
|
|
{ |
101
|
350
|
|
|
350
|
0
|
604
|
my $self = shift; |
102
|
|
|
|
|
|
|
|
103
|
350
|
|
|
|
|
789
|
return $Test::Deep::Stack->getLast; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
1; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
__END__ |