blib/lib/Linux/Event/Framer/U32BE.pm

filter: Statementstmt 100% 21 / 21 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 90.9% 30 / 33 CC 4 SCAR 9.1
CC
4
Cov
89%
_build_definition
4.3
BEGIN
1.0
BEGIN
1.0
CRAP 2.5
« blib/lib/Linux/Event/_Resolver.pm ↑ Summary bench/run-process-microbench.pl »
1 package Linux::Event::Framer::U32BE;
2 7 ▶use v5.36;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 7 our $VERSION = '0.119';
7  
8 7 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 7 ▶use Linux::Event::Framer::LengthPrefix ();
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 4 ▶sub _build_definition ($class, @args) {
Subroutine _build_definition: called CC=4 SCAR=14.6
12 4 ▶ croak 'U32BE options must be key/value pairs' if @args % 2;
Branch: 1 branch
BranchTrueFalseTotal
if @args % 2 0 4 4
13 4 my %opt = @args;
14 4 ▶ croak 'bytes is fixed at 4 for U32BE' if exists $opt{bytes};
Branch: 1 branch
BranchTrueFalseTotal
if exists $opt{"bytes"} 0 4 4
15 4 ▶ croak 'endian is fixed at big for U32BE' if exists $opt{endian};
Branch: 1 branch
BranchTrueFalseTotal
if exists $opt{"endian"} 0 4 4
16 4 return Linux::Event::Framer::LengthPrefix->_build_definition(
17 %opt, bytes => 4, endian => 'big'
18 );
19 }
20  
21 7 1;
22  
23 __END__
« blib/lib/Linux/Event/_Resolver.pm ↑ Summary bench/run-process-microbench.pl »