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