Finnigan/ProfileChunk.pm

filter: Statementstmt 96.1% 25 / 26 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 100% 5 / 5 totaltotal 95.2% 40 / 42 CC 2 SCAR 1.9
CC
2
Cov
93%
decode
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Finnigan/OLE2DIF.pm ↑ Summary Finnigan/OLE2Property.pm »
1 package Finnigan::ProfileChunk;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings FATAL => qw( all );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 our $VERSION = 0.0206;
6  
7 2 ▶use Finnigan;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use base 'Finnigan::Decoder';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10  
11 2 my $preamble_0 = [
12 "first bin" => ['V', 'UInt32'],
13 "nbins" => ['V', 'UInt32'],
14 ];
15  
16 2 my $preamble = [@$preamble_0, "fudge" => ['f<', 'Float32']];
17  
18 580 ▶sub decode {
Subroutine decode: called CC=2 SCAR=7.2
Pod documented
19 580 my $self;
20 580 ▶ if ( $_[2] > 0 ) { # the layout flag in the packet header
Branch: 1 branch
BranchTrueFalseTotal
if ($_[2] > 0) { } 580 0 580
21 580 $self = Finnigan::Decoder->read($_[1], $preamble);
22 }
23 else {
24 0 $self = Finnigan::Decoder->read($_[1], $preamble_0);
25 }
26 580 bless $self, $_[0]; # class
27 580 return $self->iterate_scalar($_[1], $self->{data}->{"nbins"}->{value}, signal => ['f<', 'Float32']);
28 }
29  
30 1 ▶sub nbins {
Subroutine nbins: called CC=1 SCAR=0.0
Pod documented
31 1 shift->{data}->{"nbins"}->{value};
32 }
33  
34 1 ▶sub first_bin {
Subroutine first_bin: called CC=1 SCAR=0.0
Pod documented
35 1 shift->{data}->{"first bin"}->{value};
36 }
37  
38 1 ▶sub fudge {
Subroutine fudge: called CC=1 SCAR=0.0
Pod documented
39 1 shift->{data}->{fudge}->{value};
40 }
41  
42 1 ▶sub signal {
Subroutine signal: called CC=1 SCAR=0.0
Pod documented
43 1 shift->{data}->{"signal"}->{value};
44 }
45  
46 2 1;
47 __END__
« Finnigan/OLE2DIF.pm ↑ Summary Finnigan/OLE2Property.pm »