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