line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
39
|
|
|
39
|
|
270
|
use strict; |
|
39
|
|
|
|
|
76
|
|
|
39
|
|
|
|
|
1145
|
|
2
|
39
|
|
|
39
|
|
191
|
use warnings; |
|
39
|
|
|
|
|
74
|
|
|
39
|
|
|
|
|
1580
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::Stack 1.202; |
5
|
|
|
|
|
|
|
|
6
|
39
|
|
|
39
|
|
209
|
use Carp qw( confess ); |
|
39
|
|
|
|
|
88
|
|
|
39
|
|
|
|
|
1994
|
|
7
|
39
|
|
|
39
|
|
259
|
use Scalar::Util; |
|
39
|
|
|
|
|
94
|
|
|
39
|
|
|
|
|
2062
|
|
8
|
|
|
|
|
|
|
|
9
|
39
|
|
|
39
|
|
15618
|
use Test::Deep::MM qw( new init Stack Arrow ); |
|
39
|
|
|
|
|
98
|
|
|
39
|
|
|
|
|
157
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init |
12
|
|
|
|
|
|
|
{ |
13
|
888
|
|
|
888
|
0
|
1272
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
888
|
|
|
|
|
2339
|
$self->SUPER::init(@_); |
16
|
|
|
|
|
|
|
|
17
|
888
|
50
|
|
|
|
1855
|
$self->setStack([]) unless $self->getStack; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push |
21
|
|
|
|
|
|
|
{ |
22
|
2220
|
|
|
2220
|
0
|
3156
|
my $self = shift; |
23
|
|
|
|
|
|
|
|
24
|
2220
|
|
|
|
|
2930
|
push(@{$self->getStack}, @_); |
|
2220
|
|
|
|
|
4460
|
|
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pop |
28
|
|
|
|
|
|
|
{ |
29
|
1287
|
|
|
1287
|
0
|
1716
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
1287
|
|
|
|
|
1534
|
return pop @{$self->getStack}; |
|
1287
|
|
|
|
|
2330
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub render |
35
|
|
|
|
|
|
|
{ |
36
|
119
|
|
|
119
|
0
|
213
|
my $self = shift; |
37
|
119
|
|
|
|
|
217
|
my $var = shift; |
38
|
|
|
|
|
|
|
|
39
|
119
|
|
|
|
|
331
|
my $stack = $self->getStack; |
40
|
|
|
|
|
|
|
|
41
|
119
|
|
|
|
|
510
|
$self->setArrow(0); |
42
|
|
|
|
|
|
|
|
43
|
119
|
|
|
|
|
305
|
foreach my $data (@$stack) |
44
|
|
|
|
|
|
|
{ |
45
|
269
|
|
|
|
|
504
|
my $exp = $data->{exp}; |
46
|
269
|
50
|
33
|
|
|
1633
|
if (Scalar::Util::blessed($exp) and $exp->isa("Test::Deep::Cmp")) |
47
|
|
|
|
|
|
|
{ |
48
|
269
|
|
|
|
|
993
|
$var = $exp->render_stack($var, $data); |
49
|
|
|
|
|
|
|
|
50
|
269
|
100
|
|
|
|
798
|
$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
|
|
|
|
|
319
|
return $var; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub getLast |
62
|
|
|
|
|
|
|
{ |
63
|
464
|
|
|
464
|
0
|
717
|
my $self = shift; |
64
|
|
|
|
|
|
|
|
65
|
464
|
|
|
|
|
894
|
return $self->getStack->[-1]; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub incArrow |
69
|
|
|
|
|
|
|
{ |
70
|
35
|
|
|
35
|
0
|
63
|
my $self = shift; |
71
|
|
|
|
|
|
|
|
72
|
35
|
|
|
|
|
140
|
my $a = $self->getArrow; |
73
|
35
|
|
|
|
|
151
|
$self->setArrow($a + 1); |
74
|
|
|
|
|
|
|
|
75
|
35
|
|
|
|
|
144
|
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__ |