line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Header::PSGI; |
2
|
4
|
|
|
4
|
|
130303
|
use 5.008_009; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
135
|
|
3
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
104
|
|
4
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
122
|
|
5
|
4
|
|
|
4
|
|
3283
|
use parent 'CGI::Header::Adapter'; |
|
4
|
|
|
|
|
1123
|
|
|
4
|
|
|
|
|
17
|
|
6
|
4
|
|
|
4
|
|
14923
|
use Carp qw/croak/; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
992
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.62001'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub status { |
11
|
2
|
|
|
2
|
1
|
966
|
my $self = shift; |
12
|
2
|
100
|
|
|
|
7
|
return $self->{status} unless @_; |
13
|
1
|
|
|
|
|
3
|
$self->{status} = shift; |
14
|
1
|
|
|
|
|
5
|
$self; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub has_status { |
18
|
6
|
|
|
6
|
0
|
33
|
exists $_[0]->{status}; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub status_code { |
22
|
6
|
|
|
6
|
1
|
11
|
my $self = shift; |
23
|
6
|
100
|
|
|
|
18
|
my $code = $self->has_status ? $self->status : '200'; |
24
|
6
|
|
|
|
|
41
|
$code =~ s/\D*$//; |
25
|
6
|
|
|
|
|
17
|
$code; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub finalize { |
29
|
6
|
|
|
6
|
1
|
8860
|
my $self = shift; |
30
|
6
|
|
|
|
|
22
|
my $status = $self->status_code; |
31
|
6
|
|
|
|
|
34
|
my $headers = $self->as_arrayref; |
32
|
|
|
|
|
|
|
|
33
|
6
|
|
|
|
|
23881
|
for ( my $i = 1; $i < @$headers; $i += 2 ) { |
34
|
6
|
|
|
|
|
30
|
$headers->[$i] = $self->process_newline( $headers->[$i] ); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
3
|
|
|
|
|
146
|
$status, $headers; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |