line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
40
|
|
|
40
|
|
266
|
use strict; |
|
40
|
|
|
|
|
82
|
|
|
40
|
|
|
|
|
1125
|
|
2
|
40
|
|
|
40
|
|
195
|
use warnings; |
|
40
|
|
|
|
|
72
|
|
|
40
|
|
|
|
|
1569
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::Stack 1.204; |
5
|
|
|
|
|
|
|
|
6
|
40
|
|
|
40
|
|
216
|
use Carp qw( confess ); |
|
40
|
|
|
|
|
80
|
|
|
40
|
|
|
|
|
2024
|
|
7
|
40
|
|
|
40
|
|
280
|
use Scalar::Util; |
|
40
|
|
|
|
|
74
|
|
|
40
|
|
|
|
|
2158
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
15799
|
use Test::Deep::MM qw( new init Stack Arrow ); |
|
40
|
|
|
|
|
99
|
|
|
40
|
|
|
|
|
171
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init |
12
|
|
|
|
|
|
|
{ |
13
|
911
|
|
|
911
|
0
|
1323
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
911
|
|
|
|
|
2429
|
$self->SUPER::init(@_); |
16
|
|
|
|
|
|
|
|
17
|
911
|
50
|
|
|
|
1923
|
$self->setStack([]) unless $self->getStack; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push |
21
|
|
|
|
|
|
|
{ |
22
|
2240
|
|
|
2240
|
0
|
3233
|
my $self = shift; |
23
|
|
|
|
|
|
|
|
24
|
2240
|
|
|
|
|
2858
|
push(@{$self->getStack}, @_); |
|
2240
|
|
|
|
|
4364
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pop |
28
|
|
|
|
|
|
|
{ |
29
|
1288
|
|
|
1288
|
0
|
1757
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
1288
|
|
|
|
|
1534
|
return pop @{$self->getStack}; |
|
1288
|
|
|
|
|
2221
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub render |
35
|
|
|
|
|
|
|
{ |
36
|
119
|
|
|
119
|
0
|
210
|
my $self = shift; |
37
|
119
|
|
|
|
|
248
|
my $var = shift; |
38
|
|
|
|
|
|
|
|
39
|
119
|
|
|
|
|
373
|
my $stack = $self->getStack; |
40
|
|
|
|
|
|
|
|
41
|
119
|
|
|
|
|
537
|
$self->setArrow(0); |
42
|
|
|
|
|
|
|
|
43
|
119
|
|
|
|
|
297
|
foreach my $data (@$stack) |
44
|
|
|
|
|
|
|
{ |
45
|
269
|
|
|
|
|
469
|
my $exp = $data->{exp}; |
46
|
269
|
50
|
33
|
|
|
1576
|
if (Scalar::Util::blessed($exp) and $exp->isa("Test::Deep::Cmp")) |
47
|
|
|
|
|
|
|
{ |
48
|
269
|
|
|
|
|
964
|
$var = $exp->render_stack($var, $data); |
49
|
|
|
|
|
|
|
|
50
|
269
|
100
|
|
|
|
862
|
$self->setArrow(0) if $exp->reset_arrow; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
else |
53
|
|
|
|
|
|
|
{ |
54
|
0
|
|
|
|
|
0
|
confess "Don't know how to render '$exp'"; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
119
|
|
|
|
|
306
|
return $var; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub getLast |
62
|
|
|
|
|
|
|
{ |
63
|
468
|
|
|
468
|
0
|
691
|
my $self = shift; |
64
|
|
|
|
|
|
|
|
65
|
468
|
|
|
|
|
909
|
return $self->getStack->[-1]; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub incArrow |
69
|
|
|
|
|
|
|
{ |
70
|
35
|
|
|
35
|
0
|
61
|
my $self = shift; |
71
|
|
|
|
|
|
|
|
72
|
35
|
|
|
|
|
141
|
my $a = $self->getArrow; |
73
|
35
|
|
|
|
|
145
|
$self->setArrow($a + 1); |
74
|
|
|
|
|
|
|
|
75
|
35
|
|
|
|
|
127
|
return $a; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub length |
79
|
|
|
|
|
|
|
{ |
80
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
81
|
|
|
|
|
|
|
|
82
|
0
|
|
|
|
|
|
return @{$self->getStack} + 0; |
|
0
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
1; |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
__END__ |