line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package POE::Driver::Spread; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
305
|
|
4
|
2
|
|
|
2
|
|
11
|
use vars qw($VERSION); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
105
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
$VERSION = "0.01"; |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
3431
|
use Spread; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use Data::Dumper; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
12
|
|
|
|
|
|
|
my $type = shift; |
13
|
|
|
|
|
|
|
my $self = bless {@_}, $type; |
14
|
|
|
|
|
|
|
return $self; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub get { |
18
|
|
|
|
|
|
|
my $self = shift; |
19
|
|
|
|
|
|
|
my $fh = shift; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# this returns all undef if we're disconnected |
22
|
|
|
|
|
|
|
my ($type, $sender, $groups, $mess, $endian, $message) = Spread::receive($self->{mbox}); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
if (!defined($type)) { |
25
|
|
|
|
|
|
|
# raise an error somewhere |
26
|
|
|
|
|
|
|
print "error: $sperrno\n"; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
return [ [$type, $sender, $groups, $mess, $endian, $message] ]; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$VERSION; |