| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Pod::Webserver::Response; |
|
2
|
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
12
|
use strict; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
106
|
|
|
4
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
|
3
|
|
|
|
|
4
|
|
|
|
3
|
|
|
|
|
532
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '3.10'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ------------------------------------------------ |
|
9
|
|
|
|
|
|
|
# The real methods are setter/getters. We only need the setters. |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub AUTOLOAD { |
|
12
|
4
|
|
|
4
|
|
367
|
my ($attrib) = $Pod::Webserver::Response::AUTOLOAD =~ /([^:]+)$/; |
|
13
|
4
|
|
|
|
|
26
|
$_[0]->{$attrib} = $_[1]; |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
} # End of AUTOLOAD. |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# ------------------------------------------------ |
|
18
|
|
|
|
|
|
|
# The real method is a setter/getter. We only need the getter. |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub content_ref { |
|
21
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
|
22
|
1
|
|
|
|
|
5
|
return \$self->{content}; |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
} # End of content_ref. |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# ------------------------------------------------ |
|
27
|
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
|
0
|
sub DESTROY {}; |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# ------------------------------------------------ |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub header { |
|
33
|
3
|
|
|
3
|
0
|
6
|
my $self = shift; |
|
34
|
3
|
|
|
|
|
6
|
push @{$self->{header}}, @_; |
|
|
3
|
|
|
|
|
17
|
|
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
} # End of header. |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# ------------------------------------------------ |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub new { |
|
41
|
2
|
|
|
2
|
0
|
9
|
my ($class, $status_code) = @_; |
|
42
|
|
|
|
|
|
|
|
|
43
|
2
|
|
|
|
|
18
|
return bless {code=>$status_code}, $class; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
} # End of new. |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# ------------------------------------------------ |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |