Webserver/Response.pm

filter: Statementstmt 88.2% 15 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 3 totaltotal 74.0% 20 / 27 CC 1 SCAR 1.3
CC
1
Cov
88%
content_ref
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« Webserver/Connection.pm ↑ Summary Webserver/Request.pm »
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;
« Webserver/Connection.pm ↑ Summary Webserver/Request.pm »