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

filter: Statementstmt 100% 28 / 28 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 97.4% 38 / 39 CC 2 SCAR 1.9
CC
2
Cov
97%
_get_datagram
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
↑ 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 3 $POE::Component::Server::Discard::VERSION = '1.16';
12 #ABSTRACT: A POE component that implements an RFC 863 Discard server.
13  
14 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 3 ▶use POE;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 3 ▶use base qw(POE::Component::Server::Echo);
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 3 ▶use constant DATAGRAM_MAXLEN => 1024;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 3 ▶use constant DEFAULT_PORT => 9;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 1 ▶sub _client_input {
Subroutine _client_input: called CC=1 SCAR=0.0
24 1 return;
25 }
26  
27 1 ▶sub _get_datagram {
Subroutine _get_datagram: called CC=2 SCAR=7.0
28 1 my ( $kernel, $socket ) = @_[ KERNEL, ARG0 ];
29  
30 1 my $remote_address = recv( $socket, my $message = "", DATAGRAM_MAXLEN, 0 );
31 1 ▶ return unless defined $remote_address;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $remote_address 0 1 1
32 1 undef;
33 }
34  
35 3 qq[Throw it away, throw it away now];
36  
37 __END__
↑ Summary