| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package POE::Component::WWW::Lipsum; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
410025
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
32
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
45
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.001004'; # VERSION |
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use POE; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
9
|
|
|
9
|
1
|
|
|
1
|
|
318
|
use base 'POE::Component::NonBlockingWrapper::Base'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
77
|
|
|
10
|
1
|
|
|
1
|
|
13
|
use WWW::Lipsum; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
191
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub _methods_define { |
|
13
|
1
|
|
|
1
|
|
349
|
return ( generate => '_wheel_entry' ); |
|
14
|
|
|
|
|
|
|
} |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub generate { |
|
17
|
1
|
|
|
1
|
1
|
6957
|
$poe_kernel->post( shift->{session_id} => generate => @_ ); |
|
18
|
|
|
|
|
|
|
} |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub _prepare_wheel { |
|
21
|
0
|
|
|
0
|
|
|
my $self = shift; |
|
22
|
0
|
|
|
|
|
|
$self->{obj} = WWW::Lipsum->new; |
|
23
|
|
|
|
|
|
|
} |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _process_request { |
|
26
|
0
|
|
|
0
|
|
|
my ( $self, $req_ref ) = @_; |
|
27
|
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
eval { |
|
29
|
0
|
|
|
|
|
|
$req_ref->{lipsum} = [ |
|
30
|
0
|
|
|
|
|
|
$self->{obj}->generate( %{ $req_ref->{args} } ) |
|
31
|
|
|
|
|
|
|
]; |
|
32
|
|
|
|
|
|
|
}; |
|
33
|
0
|
0
|
|
|
|
|
if ( $@ ) { |
|
34
|
0
|
|
|
|
|
|
$req_ref->{lipsum} = [ "Error: $@" ]; |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
0
|
|
|
|
|
if ( substr($req_ref->{lipsum}[0], 0, 5) eq 'Error' ) { |
|
38
|
0
|
|
|
|
|
|
$req_ref->{error} = $req_ref->{lipsum}[0]; |
|
39
|
0
|
|
|
|
|
|
delete $req_ref->{lipsum}; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
|
44
|
|
|
|
|
|
|
__END__ |