blib/lib/POE/Component/Server/Discard.pm

filter: Statementstmt 100% 31 / 31 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 10 / 10 Podpod n/a totaltotal 97.6% 42 / 43 SCAR 6.9
CC
2
Cov
97%
_get_datagram
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
↑ Summary
1 # $Id: Discard.pm,v 1.3 2005/01/27 10:55:49 chris Exp $
2 #
3 # POE::Component::Server::Echo, by Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
4 #
5 # This module may be used, modified, and distributed under the same
6 # terms as Perl itself. Please see the license that came with your Perl
7 # distribution for details.
8 #
9  
10 package POE::Component::Server::Discard;
11  
12 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 4 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 4 ▶use POE;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 4 ▶use base qw(POE::Component::Server::Echo);
Subroutine BEGIN: called CC=1 SCAR=0.0
17 4 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 4 ▶use constant DATAGRAM_MAXLEN => 1024;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 4 ▶use constant DEFAULT_PORT => 9;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 4 $VERSION = '1.14';
23  
24 sub _client_input {
25 1 ▶ return;
Subroutine _client_input: called CC=1 SCAR=0.0
26 }
27  
28 sub _get_datagram {
29 1 ▶ my ( $kernel, $socket ) = @_[ KERNEL, ARG0 ];
Subroutine _get_datagram: called CC=2 SCAR=7.0
30  
31 1 my $remote_address = recv( $socket, my $message = "", DATAGRAM_MAXLEN, 0 );
32 1 ▶ return unless defined $remote_address;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $remote_address 0 1 1
33 1 undef;
34 }
35  
36 4 1;
37 __END__
↑ Summary