line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Plack::Middleware::Head; |
2
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
60
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
71
|
|
4
|
2
|
|
|
2
|
|
11
|
use parent qw(Plack::Middleware); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
11
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub call { |
7
|
4
|
|
|
4
|
1
|
9
|
my($self, $env) = @_; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
return $self->app->($env) |
10
|
4
|
100
|
|
|
|
23
|
unless $env->{REQUEST_METHOD} eq 'HEAD'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
$self->response_cb($self->app->($env), sub { |
13
|
2
|
|
|
2
|
|
12
|
my $res = shift; |
14
|
2
|
100
|
|
|
|
7
|
if ($res->[2]) { |
15
|
1
|
|
|
|
|
4
|
$res->[2] = []; |
16
|
|
|
|
|
|
|
} else { |
17
|
|
|
|
|
|
|
return sub { |
18
|
3
|
100
|
|
|
|
16
|
return defined $_[0] ? '': undef; |
19
|
1
|
|
|
|
|
5
|
}; |
20
|
|
|
|
|
|
|
} |
21
|
2
|
|
|
|
|
20
|
}); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |