line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Carp::DebugScreen::TT;
|
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
56124
|
use strict;
|
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
83
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings;
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
68
|
|
5
|
2
|
|
|
2
|
|
13
|
use Template;
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
867
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.15';
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
my $DebugTemplate =<<'EOT';
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Debug Screen
|
13
|
|
|
|
|
|
|
[%- IF style %]
|
14
|
|
|
|
|
|
|
[%- style %]
|
15
|
|
|
|
|
|
|
[%- END %]
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
[% error_at | html %]
|
21
|
|
|
|
|
|
|
[%- IF show_raw_error %]
|
22
|
|
|
|
|
|
|
[% raw_error %]
|
23
|
|
|
|
|
|
|
[%- ELSE %]
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
[%- error_message %]
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
[%- END %]
|
28
|
|
|
|
|
|
|
[%- BLOCK navi %]
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
[top]
|
31
|
|
|
|
|
|
|
[stacktraces]
|
32
|
|
|
|
|
|
|
[%- IF watchlist.0 %]
|
33
|
|
|
|
|
|
|
[watchlist]
|
34
|
|
|
|
|
|
|
[%- END %]
|
35
|
|
|
|
|
|
|
[%- IF modules.0 %]
|
36
|
|
|
|
|
|
|
[modules]
|
37
|
|
|
|
|
|
|
[%- END %]
|
38
|
|
|
|
|
|
|
[%- IF environment.0 %]
|
39
|
|
|
|
|
|
|
[environment]
|
40
|
|
|
|
|
|
|
[%- END %]
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
[%- END %]
|
43
|
|
|
|
|
|
|
[%- INCLUDE navi %]
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
[%- FOREACH stacktrace = stacktraces %]
|
48
|
|
|
|
|
|
|
[% stacktrace.caller | html %] LINE : [% stacktrace.line %]
|
49
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
[%- FOREACH context = stacktrace.context %]
|
51
|
|
|
|
|
|
|
[%- IF context.hit %] | [% ELSE %] [% END %]
52
|
|
|
|
|
|
|
| [% context.no | html %]: | [% context.line | html %] |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
[%- END %]
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
[%- END %]
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
[%- IF watchlist.0 %]
|
60
|
|
|
|
|
|
|
[%- INCLUDE navi %]
|
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
[%- FOREACH watch = watchlist %]
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
[% watch.key | html %]
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
[%- watch.value %]
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
[%- END %]
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
[%- END %]
|
75
|
|
|
|
|
|
|
[%- IF modules.0 %]
|
76
|
|
|
|
|
|
|
[%- INCLUDE navi %]
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
[%- FOREACH module = modules %]
|
81
|
|
|
|
|
|
|
[% module.package | html %] ([% module.file | html %])
|
82
|
|
|
|
|
|
|
[%- END %]
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
[%- END %]
|
86
|
|
|
|
|
|
|
[%- IF environment.0 %]
|
87
|
|
|
|
|
|
|
[%- INCLUDE navi %]
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
[%- FOREACH env = environment %]
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
| [% env.key | html %] | [% env.value | html %] /td>
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
[%- END %]
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
[%- END %]
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
EOT
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
my $ErrorTemplate =<<'EOT';
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
An unexpected error has been detected
|
109
|
|
|
|
|
|
|
[%- IF style %]
|
110
|
|
|
|
|
|
|
[%- style %]
|
111
|
|
|
|
|
|
|
[%- END %]
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
An unexpected error has been detected
|
116
|
|
|
|
|
|
|
Sorry for inconvenience.
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
EOT
|
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
sub _escape {
|
123
|
467
|
|
|
467
|
|
975
|
my $str = shift;
|
124
|
|
|
|
|
|
|
|
125
|
467
|
|
|
|
|
630
|
$str =~ s/&/&/g;
|
126
|
467
|
|
|
|
|
536
|
$str =~ s/>/>/g;
|
127
|
467
|
|
|
|
|
480
|
$str =~ s/</g;
|
128
|
467
|
|
|
|
|
496
|
$str =~ s/"/"/g;
|
129
|
|
|
|
|
|
|
|
130
|
467
|
|
|
|
|
1531
|
$str;
|
131
|
|
|
|
|
|
|
}
|
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
sub as_html {
|
134
|
6
|
|
|
6
|
1
|
78
|
my ($pkg, %options) = @_;
|
135
|
|
|
|
|
|
|
|
136
|
6
|
|
33
|
|
|
33
|
$options{error_tmpl} ||= $ErrorTemplate;
|
137
|
6
|
|
33
|
|
|
28
|
$options{debug_tmpl} ||= $DebugTemplate;
|
138
|
|
|
|
|
|
|
|
139
|
6
|
100
|
|
|
|
25
|
my $tmpl = $options{debug} ? $options{debug_tmpl} : $options{error_tmpl};
|
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
my $t = Template->new(
|
142
|
467
|
|
|
467
|
|
199062
|
FILTERS => { html => sub { _escape(@_) } }
|
143
|
6
|
|
|
|
|
88
|
);
|
144
|
|
|
|
|
|
|
|
145
|
6
|
|
|
|
|
29589
|
my $html;
|
146
|
6
|
50
|
|
|
|
35
|
$t->process(\$tmpl, \%options, \$html) or $html = $t->error();
|
147
|
|
|
|
|
|
|
|
148
|
6
|
|
|
|
|
4235
|
return $html;
|
149
|
|
|
|
|
|
|
}
|
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
1;
|
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
__END__
|