line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::Plugin::Perlinfo; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
17791
|
use HTML::Perlinfo; |
|
1
|
|
|
|
|
57469
|
|
|
1
|
|
|
|
|
68
|
|
4
|
1
|
|
|
1
|
|
9
|
use HTML::Perlinfo::General; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
221
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub finalize_error { |
9
|
0
|
|
|
0
|
0
|
|
my $c = shift; |
10
|
|
|
|
|
|
|
|
11
|
0
|
|
|
|
|
|
$c->next::method(@_); |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
my $perlinfo = HTML::Perlinfo->new(htmlstart=>0); |
14
|
0
|
|
|
|
|
|
my $perlinfo_html = $perlinfo->print_htmlhead(); |
15
|
0
|
|
|
|
|
|
$perlinfo_html .= print_general(); |
16
|
0
|
|
|
|
|
|
delete $INC{'HTML/Perlinfo.pm'}; |
17
|
0
|
|
|
|
|
|
$perlinfo_html .= print_thesemodules('loaded',[values %INC]); |
18
|
0
|
|
|
|
|
|
$perlinfo_html .= print_variables(); |
19
|
|
|
|
|
|
|
|
20
|
0
|
0
|
|
|
|
|
if ( $c->debug ) { |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $html = qq{ |
23
|
|
|
|
|
|
|
<style type="text/css"> |
24
|
|
|
|
|
|
|
div.infocolor { |
25
|
|
|
|
|
|
|
background-color: #eee; |
26
|
|
|
|
|
|
|
border: 1px solid #575; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
div#infowidth table { |
29
|
|
|
|
|
|
|
width: 100%; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
div#infowidth th, td { |
32
|
|
|
|
|
|
|
padding-right: 1.5em; |
33
|
|
|
|
|
|
|
text-align: left; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
div#infowidth .line { |
36
|
|
|
|
|
|
|
color: #000; |
37
|
|
|
|
|
|
|
font-weight: strong; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
</style> |
40
|
|
|
|
|
|
|
<div class="infocolor error"> |
41
|
|
|
|
|
|
|
<div id="infowidth"> |
42
|
|
|
|
|
|
|
$perlinfo_html |
43
|
|
|
|
|
|
|
</div> |
44
|
|
|
|
|
|
|
</div> |
45
|
|
|
|
|
|
|
}; |
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
$c->res->{body} =~ s{<div class="infos">}{$html<div class="infos">}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |
52
|
|
|
|
|
|
|
__END__ |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=pod |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 NAME |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Catalyst::Plugin::Perlinfo - Display HTML::Perlinfo on the debug screen |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SYNOPSIS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
use Catalyst qw/-Debug Perlinfo/; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 DESCRIPTION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This plugin will enhance the standard Catalyst debug screen by including |
67
|
|
|
|
|
|
|
a large amount of information about your Perl installation in HTML. |
68
|
|
|
|
|
|
|
So far, this includes information about Perl compilation options, the Perl |
69
|
|
|
|
|
|
|
version, server information and environment, HTTP headers, OS version |
70
|
|
|
|
|
|
|
information, Perl modules, and more. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
L<HTML::Perlinfo> generates this useful information. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
This plugin is only active in -Debug mode. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 SEE ALSO |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
L<Catalyst> |
79
|
|
|
|
|
|
|
L<HTML::Perlinfo> |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 AUTHORS |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Mike Accardo, <accardo@cpan.org> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 COPYRIGHT |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Copyright (c) 2016 |
88
|
|
|
|
|
|
|
This program is free software, you can redistribute it and/or modify it |
89
|
|
|
|
|
|
|
under the same terms as Perl itself. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=cut |