line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
40
|
|
|
40
|
|
276
|
use strict; |
|
40
|
|
|
|
|
89
|
|
|
40
|
|
|
|
|
1178
|
|
2
|
40
|
|
|
40
|
|
195
|
use warnings; |
|
40
|
|
|
|
|
99
|
|
|
40
|
|
|
|
|
1593
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::Stack 1.203; |
5
|
|
|
|
|
|
|
|
6
|
40
|
|
|
40
|
|
222
|
use Carp qw( confess ); |
|
40
|
|
|
|
|
83
|
|
|
40
|
|
|
|
|
2083
|
|
7
|
40
|
|
|
40
|
|
270
|
use Scalar::Util; |
|
40
|
|
|
|
|
80
|
|
|
40
|
|
|
|
|
2133
|
|
8
|
|
|
|
|
|
|
|
9
|
40
|
|
|
40
|
|
15881
|
use Test::Deep::MM qw( new init Stack Arrow ); |
|
40
|
|
|
|
|
161
|
|
|
40
|
|
|
|
|
158
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init |
12
|
|
|
|
|
|
|
{ |
13
|
886
|
|
|
886
|
0
|
1317
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
886
|
|
|
|
|
2364
|
$self->SUPER::init(@_); |
16
|
|
|
|
|
|
|
|
17
|
886
|
50
|
|
|
|
1826
|
$self->setStack([]) unless $self->getStack; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push |
21
|
|
|
|
|
|
|
{ |
22
|
2217
|
|
|
2217
|
0
|
3236
|
my $self = shift; |
23
|
|
|
|
|
|
|
|
24
|
2217
|
|
|
|
|
2950
|
push(@{$self->getStack}, @_); |
|
2217
|
|
|
|
|
4330
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pop |
28
|
|
|
|
|
|
|
{ |
29
|
1288
|
|
|
1288
|
0
|
1796
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
1288
|
|
|
|
|
1551
|
return pop @{$self->getStack}; |
|
1288
|
|
|
|
|
2224
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub render |
35
|
|
|
|
|
|
|
{ |
36
|
119
|
|
|
119
|
0
|
213
|
my $self = shift; |
37
|
119
|
|
|
|
|
250
|
my $var = shift; |
38
|
|
|
|
|
|
|
|
39
|
119
|
|
|
|
|
373
|
my $stack = $self->getStack; |
40
|
|
|
|
|
|
|
|
41
|
119
|
|
|
|
|
516
|
$self->setArrow(0); |
42
|
|
|
|
|
|
|
|
43
|
119
|
|
|
|
|
321
|
foreach my $data (@$stack) |
44
|
|
|
|
|
|
|
{ |
45
|
269
|
|
|
|
|
495
|
my $exp = $data->{exp}; |
46
|
269
|
50
|
33
|
|
|
1622
|
if (Scalar::Util::blessed($exp) and $exp->isa("Test::Deep::Cmp")) |
47
|
|
|
|
|
|
|
{ |
48
|
269
|
|
|
|
|
864
|
$var = $exp->render_stack($var, $data); |
49
|
|
|
|
|
|
|
|
50
|
269
|
100
|
|
|
|
807
|
$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
|
|
|
|
|
320
|
return $var; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub getLast |
62
|
|
|
|
|
|
|
{ |
63
|
466
|
|
|
466
|
0
|
750
|
my $self = shift; |
64
|
|
|
|
|
|
|
|
65
|
466
|
|
|
|
|
941
|
return $self->getStack->[-1]; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub incArrow |
69
|
|
|
|
|
|
|
{ |
70
|
35
|
|
|
35
|
0
|
75
|
my $self = shift; |
71
|
|
|
|
|
|
|
|
72
|
35
|
|
|
|
|
133
|
my $a = $self->getArrow; |
73
|
35
|
|
|
|
|
138
|
$self->setArrow($a + 1); |
74
|
|
|
|
|
|
|
|
75
|
35
|
|
|
|
|
125
|
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__ |