line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::ServerInfo; |
2
|
2
|
|
|
2
|
|
2704
|
use Mojo::Base 'Mojolicious::Plugin'; |
|
2
|
|
|
|
|
19815
|
|
|
2
|
|
|
|
|
65
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.010'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub register { |
7
|
0
|
|
|
0
|
1
|
|
my ($self, $app) = @_; |
8
|
|
|
|
|
|
|
|
9
|
0
|
|
|
|
|
|
push @{$app->renderer->classes}, __PACKAGE__; |
|
0
|
|
|
|
|
|
|
10
|
0
|
|
|
|
|
|
push @{$app->static->classes}, __PACKAGE__; |
|
0
|
|
|
|
|
|
|
11
|
0
|
|
|
0
|
|
|
$app->routes->any('/serverinfo' => sub { shift->render } ); |
|
0
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
1; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 NAME |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Mojolicious::Plugin::ServerInfo - display Server and Perl environment data |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=begin html |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=end html |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
$app->plugin('Mojolicious::Plugin::ServerInfo'); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 DESCRIPTION |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
L is a Mojolicious-Plugin. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
It creates a route |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
/serverinfo |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
where detailed info is displayed in formatted HTML. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 METHODS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=over 4 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item register |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Do not use directly. It is called by Mojolicious. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=back |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SEE ALSO |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=over |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item * |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
L |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=back |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 SOURCE REPOSITORY |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
L |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 AUTHOR |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Helmut Wollmersdorfer, Ehelmut.wollmersdorfer@gmail.comE |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=begin html |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=end html |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Copyright (C) 2013-2015 by Helmut Wollmersdorfer |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
84
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=cut |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
__DATA__ |