| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package POE::Component::Server::SimpleHTTP::State; |
|
2
|
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
910
|
use strict; |
|
|
7
|
|
|
|
|
12
|
|
|
|
7
|
|
|
|
|
210
|
|
|
4
|
7
|
|
|
7
|
|
34
|
use warnings; |
|
|
7
|
|
|
|
|
13
|
|
|
|
7
|
|
|
|
|
244
|
|
|
5
|
7
|
|
|
7
|
|
1139
|
use POE::Wheel::ReadWrite; |
|
|
7
|
|
|
|
|
127214
|
|
|
|
7
|
|
|
|
|
316
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '2.20'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
7
|
|
|
7
|
|
950
|
use Moose; |
|
|
7
|
|
|
|
|
464389
|
|
|
|
7
|
|
|
|
|
50
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'wheel' => ( |
|
12
|
|
|
|
|
|
|
is => 'ro', |
|
13
|
|
|
|
|
|
|
isa => 'POE::Wheel::ReadWrite', |
|
14
|
|
|
|
|
|
|
clearer => 'clear_wheel', |
|
15
|
|
|
|
|
|
|
predicate => 'has_wheel', |
|
16
|
|
|
|
|
|
|
required => 1, |
|
17
|
|
|
|
|
|
|
); |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
has 'response' => ( |
|
20
|
|
|
|
|
|
|
is => 'ro', |
|
21
|
|
|
|
|
|
|
isa => 'POE::Component::Server::SimpleHTTP::Response', |
|
22
|
|
|
|
|
|
|
writer => 'set_response', |
|
23
|
|
|
|
|
|
|
clearer => 'clear_response', |
|
24
|
|
|
|
|
|
|
); |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has 'request' => ( |
|
27
|
|
|
|
|
|
|
is => 'ro', |
|
28
|
|
|
|
|
|
|
isa => 'HTTP::Request', |
|
29
|
|
|
|
|
|
|
writer => 'set_request', |
|
30
|
|
|
|
|
|
|
clearer => 'clear_request', |
|
31
|
|
|
|
|
|
|
); |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has 'connection' => ( |
|
34
|
|
|
|
|
|
|
is => 'ro', |
|
35
|
|
|
|
|
|
|
isa => 'POE::Component::Server::SimpleHTTP::Connection', |
|
36
|
|
|
|
|
|
|
writer => 'set_connection', |
|
37
|
|
|
|
|
|
|
clearer => 'clear_connection', |
|
38
|
|
|
|
|
|
|
init_arg => undef, |
|
39
|
|
|
|
|
|
|
); |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
has 'done' => ( |
|
42
|
|
|
|
|
|
|
is => 'ro', |
|
43
|
|
|
|
|
|
|
isa => 'Bool', |
|
44
|
|
|
|
|
|
|
init_arg => undef, |
|
45
|
|
|
|
|
|
|
default => sub { 0 }, |
|
46
|
|
|
|
|
|
|
writer => 'set_done', |
|
47
|
|
|
|
|
|
|
); |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has 'streaming' => ( |
|
50
|
|
|
|
|
|
|
is => 'ro', |
|
51
|
|
|
|
|
|
|
isa => 'Bool', |
|
52
|
|
|
|
|
|
|
init_arg => undef, |
|
53
|
|
|
|
|
|
|
default => sub { 0 }, |
|
54
|
|
|
|
|
|
|
writer => 'set_streaming', |
|
55
|
|
|
|
|
|
|
); |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub reset { |
|
58
|
6
|
|
|
6
|
0
|
8
|
my $self = shift; |
|
59
|
6
|
|
|
|
|
273
|
$self->clear_response; |
|
60
|
6
|
|
|
|
|
267
|
$self->clear_request; |
|
61
|
6
|
|
|
|
|
268
|
$self->set_streaming(0); |
|
62
|
6
|
|
|
|
|
252
|
$self->set_done(0); |
|
63
|
6
|
50
|
|
|
|
255
|
$self->wheel->set_output_filter( $self->wheel->get_input_filter ) if $self->has_wheel; |
|
64
|
6
|
|
|
|
|
49
|
return 1; |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub close_wheel { |
|
68
|
9
|
|
|
9
|
0
|
23
|
my $self = shift; |
|
69
|
9
|
50
|
|
|
|
436
|
return unless $self->has_wheel; |
|
70
|
9
|
|
|
|
|
388
|
$self->wheel->shutdown_input; |
|
71
|
9
|
|
|
|
|
1468
|
$self->wheel->shutdown_output; |
|
72
|
9
|
|
|
|
|
1540
|
$self->clear_wheel; |
|
73
|
9
|
|
|
|
|
1064
|
return 1; |
|
74
|
|
|
|
|
|
|
} |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub wheel_alive { |
|
77
|
24
|
|
|
24
|
0
|
47
|
my $self = shift; |
|
78
|
24
|
50
|
|
|
|
1130
|
return unless $self->has_wheel; |
|
79
|
24
|
50
|
|
|
|
1043
|
return unless defined $self->wheel; |
|
80
|
24
|
50
|
|
|
|
1060
|
return unless $self->wheel->get_input_handle(); |
|
81
|
24
|
|
|
|
|
260
|
return 1; |
|
82
|
|
|
|
|
|
|
} |
|
83
|
|
|
|
|
|
|
|
|
84
|
7
|
|
|
7
|
|
49579
|
no Moose; |
|
|
7
|
|
|
|
|
24
|
|
|
|
7
|
|
|
|
|
41
|
|
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
'This monkey has gone to heaven'; |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
__END__ |