Finnigan/GenericDataHeader.pm

filter: Statementstmt 97.0% 33 / 34 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.0% 9 / 10 Podpod 100% 6 / 6 totaltotal 94.2% 49 / 52 CC 3 SCAR 4.6
CC
3
Cov
94%
decode
3.0
labels
2.0
BEGIN
1.0
CRAP 1.6
« Finnigan/MethodFile.pm ↑ Summary Finnigan/RawFileInfoPreamble.pm »
1 package Finnigan::GenericDataHeader;
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 3 ▶sub decode {
Subroutine decode: called CC=3 SCAR=11.0
Pod documented
11 3 my ($class, $stream) = @_;
12  
13 3 my $self = Finnigan::Decoder->read($stream, [n => ['V', 'UInt32']]);
14 3 bless $self, $class;
15  
16 3 ▶ if ( $self->n ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->n) 3 0 3
17 3 $self->iterate_object($stream, $self->n, field => 'Finnigan::GenericDataDescriptor');
18 }
19  
20 # prepare the field templates
21 3 my $ord = 1;
22 3 foreach my $f ( @{$self->{data}->{"field"}->{value}} ) {
23 608 push @{$self->{templates}}, $f->definition;
24 608 push @{$self->{ordered_templates}}, $f->definition($ord++);
25 608 push @{$self->{labels}}, $f->label;
26 }
27  
28 3 return $self;
29 }
30  
31 9 ▶sub n {
Subroutine n: called CC=1 SCAR=0.0
Pod documented
32 # the number of data descriptors
33 9 shift->{data}->{"n"}->{value};
34 }
35  
36 21 ▶sub fields {
Subroutine fields: called CC=1 SCAR=0.0
Pod documented
37 21 shift->{data}->{"field"}->{value};
38 }
39  
40 0 ▶sub labels {
Subroutine labels: not called CC=1 SCAR=6.9
Pod documented
41 0 shift->{labels};
42 }
43  
44 33 ▶sub field_templates {
Subroutine field_templates: called CC=1 SCAR=0.0
Pod documented
45 33 shift->{templates};
46 }
47  
48 18 ▶sub ordered_field_templates {
Subroutine ordered_field_templates: called CC=1 SCAR=0.0
Pod documented
49 18 shift->{ordered_templates};
50 }
51  
52 2 1;
53 __END__
« Finnigan/MethodFile.pm ↑ Summary Finnigan/RawFileInfoPreamble.pm »