| 1 | package Pod::Webserver::Response; | ||
| 2 | |||
| 3 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 3 | our $VERSION = '3.11'; | |
| 7 | |||
| 8 | # ------------------------------------------------ | ||
| 9 | # The real methods are setter/getters. We only need the setters. | ||
| 10 | |||
| 11 | 2 | ▶ | sub AUTOLOAD { |
|
Subroutine
AUTOLOAD: called CC=1 SCAR=0.0
| |||
| 12 | 2 | my ($attrib) = $Pod::Webserver::Response::AUTOLOAD =~ /([^:]+)$/; | |
| 13 | 2 | $_[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 | 0 | ▶ | sub content_ref { |
|
Subroutine
content_ref: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 21 | 0 | my $self = shift; | |
| 22 | 0 | return \$self->{content}; | |
| 23 | |||
| 24 | } # End of content_ref. | ||
| 25 | |||
| 26 | # ------------------------------------------------ | ||
| 27 | |||
| 28 | 0 | ▶ | sub DESTROY {}; |
|
Subroutine
DESTROY: not called CC=1 SCAR=0.0
| |||
| 29 | |||
| 30 | # ------------------------------------------------ | ||
| 31 | |||
| 32 | 2 | ▶ | sub header { |
|
Subroutine
header: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 33 | 2 | my $self = shift; | |
| 34 | 2 | push @{$self->{header}}, @_; | |
| 35 | |||
| 36 | } # End of header. | ||
| 37 | |||
| 38 | # ------------------------------------------------ | ||
| 39 | |||
| 40 | 1 | ▶ | sub new { |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 41 | 1 | my ($class, $status_code) = @_; | |
| 42 | |||
| 43 | 1 | return bless {code=>$status_code}, $class; | |
| 44 | |||
| 45 | } # End of new. | ||
| 46 | |||
| 47 | # ------------------------------------------------ | ||
| 48 | |||
| 49 | 3 | 1; | |