line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Plack::Middleware::DebugRequestParams; |
2
|
3
|
|
|
3
|
|
265263
|
use 5.008005; |
|
3
|
|
|
|
|
12
|
|
|
3
|
|
|
|
|
119
|
|
3
|
3
|
|
|
3
|
|
16
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
94
|
|
4
|
3
|
|
|
3
|
|
27
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
106
|
|
5
|
3
|
|
|
3
|
|
1062
|
use parent qw(Plack::Middleware); |
|
3
|
|
|
|
|
349
|
|
|
3
|
|
|
|
|
24
|
|
6
|
3
|
|
|
3
|
|
52638
|
use Text::ASCIITable; |
|
3
|
|
|
|
|
80802
|
|
|
3
|
|
|
|
|
220
|
|
7
|
3
|
|
|
3
|
|
3162
|
use Plack::Request; |
|
3
|
|
|
|
|
156926
|
|
|
3
|
|
|
|
|
131
|
|
8
|
3
|
|
|
3
|
|
2992
|
use Text::VisualWidth::UTF8; |
|
3
|
|
|
|
|
18921
|
|
|
3
|
|
|
|
|
742
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = "0.06"; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub call { |
13
|
7
|
|
|
7
|
1
|
99355
|
my($self, $env) = @_; |
14
|
|
|
|
|
|
|
|
15
|
7
|
100
|
100
|
|
|
230
|
if (! ($self->{ignore_path} && $env->{REQUEST_URI} =~ /$self->{ignore_path}/)) { |
16
|
6
|
|
|
|
|
54
|
my $req = Plack::Request->new($env); |
17
|
6
|
|
|
|
|
77
|
my $params = $req->parameters; |
18
|
6
|
100
|
|
|
|
1498
|
if (%$params) { |
19
|
5
|
|
|
|
|
58
|
my $table = Text::ASCIITable->new(+{ cb_count => \&Text::VisualWidth::UTF8::width }); |
20
|
5
|
|
|
|
|
196
|
$table->setCols(qw(Parameter Value)); |
21
|
5
|
|
|
|
|
344
|
for my $key (sort keys %$params) { |
22
|
5
|
|
|
|
|
20
|
my @values = $params->get_all($key); |
23
|
5
|
|
|
|
|
62
|
for my $value (@values) { |
24
|
7
|
|
|
|
|
333
|
$table->addRow($key, $value); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
5
|
|
|
|
|
410
|
print STDERR $table; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
7
|
|
|
|
|
3357
|
return $self->app->($env); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
__END__ |