Lumberjack/Frame/WindowSize.pm

filter: Statementstmt 64.2% 9 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 1 / 3 Podpod n/a totaltotal 58.8% 10 / 17 CC 1 SCAR 5.1
CC
1
Cov
64%
__ANON__
2.0
_read_payload
2.0
BEGIN
1.0
CRAP 1.7
« Lumberjack/Frame/Ack.pm ↑ Summary Lumberjack/Frame/Compressed.pm »
1 package Net::Lumberjack::Frame::WindowSize;
2  
3 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 # ABSTRACT: class for parsing Lumberjack window size frames
6 1 our $VERSION = '1.01'; # VERSION
7  
8 1 extends 'Net::Lumberjack::Frame';
9  
10 1 has 'type' => ( is => 'rw', isa => 'Str', default => 'W' );
11 1 has 'window_size' => ( is => 'rw', isa => 'Maybe[Int]' );
12  
13 has 'payload' => (
14 is => 'rw', isa => 'Str', lazy => 1,
15 'default' => sub {
16 0 ▶ my $self = shift;
Subroutine __ANON__: not called CC=1 SCAR=6.9
17 0 return pack('N', $self->window_size);
18 },
19 1 );
20  
21 sub _read_payload {
22 0 ▶ my ( $self, $fh ) = @_;
Subroutine _read_payload: not called CC=1 SCAR=6.9
23 0 $self->window_size( $self->_read_uint32($fh) );
24 0 return;
25 }
26  
27 1 1;
28  
29 __END__
30  
31 =pod
32  
33 =encoding UTF-8
34  
35 =head1 NAME
36  
37 Net::Lumberjack::Frame::WindowSize - class for parsing Lumberjack window size frames
38  
39 =head1 VERSION
40  
41 version 1.01
42  
43 =head1 AUTHOR
44  
45 Markus Benning <ich@markusbenning.de>
46  
47 =head1 COPYRIGHT AND LICENSE
48  
49 This software is Copyright (c) 2016 by Markus Benning.
50  
51 This is free software, licensed under:
52  
53 The Apache License, Version 2.0, January 2004
54  
55 =cut
« Lumberjack/Frame/Ack.pm ↑ Summary Lumberjack/Frame/Compressed.pm »