blib/lib/HTTP/Engine/Role/ResponseWriter/OutputHeader.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 7 | 7 | 100.0 |
branch | 2 | 2 | 100.0 |
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 11 | 12 | 91.6 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package HTTP::Engine::Role::ResponseWriter::OutputHeader; | ||||||
2 | 17 | 17 | 18053 | use Any::Moose '::Role'; | |||
17 | 40 | ||||||
17 | 114 | ||||||
3 | |||||||
4 | my $CRLF = "\015\012"; | ||||||
5 | |||||||
6 | sub output_header { | ||||||
7 | 8 | 8 | 0 | 17 | my($self, $req, $res) = @_; | ||
8 | 8 | 100 | 83 | $self->write($self->response_line($res) . $CRLF) if $self->can('response_line'); | |||
9 | 8 | 120 | $self->write($res->headers->as_string($CRLF)); | ||||
10 | 8 | 139 | $self->write($CRLF); | ||||
11 | } | ||||||
12 | |||||||
13 | 1; | ||||||
14 |