| blib/lib/Hoppy/TCPHandler/Send.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 16 | 16 | 100.0 |
| branch | 1 | 2 | 50.0 |
| condition | 1 | 3 | 33.3 |
| subroutine | 4 | 4 | 100.0 |
| pod | 1 | 1 | 100.0 |
| total | 23 | 26 | 88.4 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Hoppy::TCPHandler::Send; | ||||||
| 2 | 7 | 7 | 42 | use strict; | |||
| 7 | 11 | ||||||
| 7 | 233 | ||||||
| 3 | 7 | 7 | 37 | use warnings; | |||
| 7 | 12 | ||||||
| 7 | 174 | ||||||
| 4 | 7 | 7 | 35 | use base qw( Hoppy::Base ); | |||
| 7 | 16 | ||||||
| 7 | 1173 | ||||||
| 5 | |||||||
| 6 | sub do_handle { | ||||||
| 7 | 1 | 1 | 1 | 20 | my $self = shift; | ||
| 8 | 1 | 3 | my $poe = shift; | ||||
| 9 | 1 | 1 | my $message = shift; | ||||
| 10 | 1 | 33 | 16 | $message ||= $poe->args->[0]; | |||
| 11 | 1 | 11 | my $heap = $poe->heap; | ||||
| 12 | 1 | 50 | 8 | if ( $heap->{client} ) { | |||
| 13 | 1 | 12 | $heap->{client}->put($message); | ||||
| 14 | } | ||||||
| 15 | } | ||||||
| 16 | |||||||
| 17 | 1; | ||||||
| 18 | __END__ |