File Coverage

blib/lib/POE/Component/Server/HTTP/Response.pm
Criterion Covered Total %
statement 12 32 37.5
branch 0 8 0.0
condition n/a
subroutine 4 9 44.4
pod 1 5 20.0
total 17 54 31.4


line stmt bran cond sub pod time code
1 4     4   25 use strict;
  4         9  
  4         216  
2             package POE::Component::Server::HTTP::Response;
3              
4 4     4   23 use vars qw(@ISA);
  4         6  
  4         188  
5 4     4   23 use HTTP::Response;
  4         15  
  4         160  
6             @ISA = qw(HTTP::Response);
7              
8 4     4   28 use POE;
  4         7  
  4         31  
9              
10             sub streaming {
11 0     0 0   my $self = shift;
12 0 0         if (@_) {
13 0 0         if ($_[0]) {
14 0           $self->{streaming} = 1;
15             }
16             else {
17 0           $self->{streaming} = 0;
18             }
19             }
20 0           return $self->{streaming};
21             }
22              
23             sub is_error {
24 0     0 1   my $self = shift;
25 0 0         if (@_) {
26 0 0         if ($_[0]) {
27 0           $self->{is_error} = 1;
28             }
29             else {
30 0           $self->{is_error} = 0;
31             }
32             }
33 0           return $self->{is_error};
34             }
35              
36             sub send {
37 0     0 0   my $self = shift;
38 0           $self->{connection}->{wheel}->put(@_);
39             }
40              
41             sub continue {
42 0     0 0   my $self = shift;
43 0           $poe_kernel->post($self->{connection}->{session},
44             'execute' => $self->{connection}->{my_id});
45             }
46              
47             sub close {
48 0     0 0   my $self = shift;
49 0           $self->{streaming} = 0;
50 0           shift @{$self->{connection}->{handlers}->{Queue}};
  0            
51             }
52              
53             1;