| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::Debugbar; |
|
2
|
2
|
|
|
2
|
|
407389
|
use Mojo::Base 'Mojolicious::Plugin'; |
|
|
2
|
|
|
|
|
28073
|
|
|
|
2
|
|
|
|
|
15
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
4274
|
use Mojo::Debugbar; |
|
|
2
|
|
|
|
|
558793
|
|
|
|
2
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.1.2'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head2 register |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=cut |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub register { |
|
13
|
0
|
|
|
0
|
1
|
|
my ($self, $app, $config) = @_; |
|
14
|
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
my $debugbar = Mojo::Debugbar->new(app => $app, config => $config); |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$app->hook(around_dispatch => sub { |
|
18
|
0
|
|
|
0
|
|
|
my ($next, $c) = @_; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Start recording |
|
21
|
0
|
|
|
|
|
|
$debugbar->start; |
|
22
|
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
$next->(); |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# Stop recording |
|
26
|
0
|
|
|
|
|
|
$debugbar->stop; |
|
27
|
0
|
|
|
|
|
|
}); |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$app->hook(after_render => sub { |
|
30
|
0
|
|
|
0
|
|
|
my ($c, $output, $format) = @_; |
|
31
|
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
return unless $format eq 'html'; |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# if there is a |