Finnigan/FractionCollector.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 100% 4 / 4 totaltotal 100% 38 / 38 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Finnigan/CASInfoPreamble.pm ↑ Summary Finnigan/GenericRecord.pm »
1 package Finnigan::FractionCollector;
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 2 ▶use overload ('""' => 'stringify');
Subroutine BEGIN: called CC=1 SCAR=0.0
11
12  
13 2 my @fields = (
14 "low mz" => ['d<', 'Float64'],
15 "high mz" => ['d<', 'Float64'],
16 );
17  
18 37 ▶sub decode {
Subroutine decode: called CC=1 SCAR=0.0
Pod documented
19 37 return bless Finnigan::Decoder->read($_[1], \@fields), $_[0];
20 }
21  
22 1 ▶sub low {
Subroutine low: called CC=1 SCAR=0.0
Pod documented
23 1 shift->{data}->{"low mz"}->{value};
24 }
25  
26 1 ▶sub high {
Subroutine high: called CC=1 SCAR=0.0
Pod documented
27 1 shift->{data}->{"high mz"}->{value};
28 }
29  
30 5 ▶sub stringify {
Subroutine stringify: called CC=1 SCAR=0.0
Pod documented
31 5 my $self = shift;
32 5 my $low = sprintf("%.2f", $self->{data}->{"low mz"}->{value});
33 5 my $high = sprintf("%.2f", $self->{data}->{"high mz"}->{value});
34 5 return "[$low-$high]";
35 }
36  
37 2 1;
38 __END__
« Finnigan/CASInfoPreamble.pm ↑ Summary Finnigan/GenericRecord.pm »