line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Devel::Trace::Subs::HTML; |
2
|
4
|
|
|
4
|
|
69066
|
use 5.008; |
|
4
|
|
|
|
|
24
|
|
3
|
4
|
|
|
4
|
|
18
|
use strict; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
81
|
|
4
|
4
|
|
|
4
|
|
30
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
95
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
17
|
use Data::Dumper; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
155
|
|
7
|
4
|
|
|
4
|
|
19
|
use Exporter; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
114
|
|
8
|
4
|
|
|
4
|
|
3766
|
use HTML::Template; |
|
4
|
|
|
|
|
48919
|
|
|
4
|
|
|
|
|
1531
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.24'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
13
|
|
|
|
|
|
|
our @EXPORT_OK = qw(html); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my (@stack_tpl, @flow_tpl, @all_tpl); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub html { |
18
|
|
|
|
|
|
|
|
19
|
9
|
|
|
9
|
1
|
7816
|
my %p = @_; |
20
|
|
|
|
|
|
|
|
21
|
9
|
|
|
|
|
24
|
my $file = $p{file}; |
22
|
9
|
|
|
|
|
19
|
my $want = $p{want}; |
23
|
9
|
|
|
|
|
16
|
my $data = $p{data}; |
24
|
|
|
|
|
|
|
|
25
|
9
|
100
|
100
|
|
|
62
|
if ($want && $want eq 'stack') { |
|
|
100
|
66
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
3
|
|
|
|
|
24
|
my $template = HTML::Template->new(arrayref => \@stack_tpl); |
28
|
|
|
|
|
|
|
|
29
|
3
|
|
|
|
|
4755
|
$template->param(STACK => $data); |
30
|
|
|
|
|
|
|
|
31
|
3
|
100
|
|
|
|
124
|
if ($file) { |
32
|
2
|
50
|
|
|
|
312
|
open my $wfh, '>', $file |
33
|
|
|
|
|
|
|
or die "Can't open the output file, $file: $!"; |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
22
|
print $wfh $template->output; |
36
|
2
|
50
|
|
|
|
1643
|
close $wfh or die $!; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
else { |
39
|
1
|
|
|
|
|
5
|
print $template->output; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
elsif ($want && $want eq 'flow') { |
43
|
|
|
|
|
|
|
|
44
|
3
|
|
|
|
|
33
|
my $template = HTML::Template->new(arrayref => \@flow_tpl); |
45
|
|
|
|
|
|
|
|
46
|
3
|
|
|
|
|
2771
|
$template->param(FLOW => $data); |
47
|
|
|
|
|
|
|
|
48
|
3
|
100
|
|
|
|
105
|
if ($file) { |
49
|
2
|
50
|
|
|
|
181
|
open my $wfh, '>', $file |
50
|
|
|
|
|
|
|
or die "Can't open the output file, $file: $!"; |
51
|
|
|
|
|
|
|
|
52
|
2
|
|
|
|
|
17
|
print $wfh $template->output; |
53
|
2
|
50
|
|
|
|
1146
|
close $wfh or die $!; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
else { |
56
|
1
|
|
|
|
|
7
|
print $template->output; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
else { |
60
|
3
|
|
|
|
|
21
|
my $template = HTML::Template->new(arrayref => \@all_tpl); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
$template->param( |
63
|
|
|
|
|
|
|
FLOW => $data->{flow}, |
64
|
|
|
|
|
|
|
STACK => $data->{stack}, |
65
|
3
|
|
|
|
|
6148
|
); |
66
|
3
|
100
|
|
|
|
150
|
if ($file) { |
67
|
2
|
50
|
|
|
|
255
|
open my $wfh, '>', $file |
68
|
|
|
|
|
|
|
or die "Can't open the output file, $file: $!"; |
69
|
|
|
|
|
|
|
|
70
|
2
|
|
|
|
|
18
|
print $wfh $template->output; |
71
|
2
|
50
|
|
|
|
3278
|
close $wfh or die $!; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
else { |
74
|
1
|
|
|
|
|
4
|
print $template->output; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
BEGIN { |
80
|
|
|
|
|
|
|
|
81
|
4
|
|
|
4
|
|
18
|
@stack_tpl = <
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Devel::Trace::Subs |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Stack trace: |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
EOF |
112
|
|
|
|
|
|
|
|
113
|
4
|
|
|
|
|
10
|
@flow_tpl = <
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Devel::Trace::Subs |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Code Subs: |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
EOF |
135
|
|
|
|
|
|
|
|
136
|
4
|
|
|
|
|
112
|
@all_tpl = <
|
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Devel::Trace::Subs |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Code Subs: |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
Stack trace: |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
EOF |
181
|
|
|
|
|
|
|
} |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
__END__ |