lib/Convert/Pheno/Source/Result.pm

filter: Statementstmt 100% 20 / 20 Branchbran 75.0% 6 / 8 Conditioncond 75.0% 3 / 4 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 5 totaltotal 80.4% 37 / 46 CC 7 SCAR 11.1
CC
7
Cov
91%
new
5.1
apply_to
3.0
BEGIN
1.0
CRAP 3.0
« lib/Convert/Pheno/Tabular/Record.pm ↑ Summary lib/Convert/Pheno/CSV.pm »
1 package Convert::Pheno::Source::Result;
2  
3 136 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 136 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 235 ▶sub new {
Subroutine new: called CC=5 SCAR=16.3
Pod undocumented
7 235 my ( $class, $arg ) = @_;
8 235 ▶ $arg ||= {};
Condition50%1/2
$arg ||= {}
l!l
2350
MC/DC0%0/1
$arg ||= {}
$arg
Truth table50%1/2
A
A= $arg
Aresult
11
00
9 235 ▶ die "Source result requires data\n" unless exists $arg->{data};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $arg->{"data"} 0 235 235
10  
11 return bless {
12 data => $arg->{data},
13 owned => $arg->{owned} ? 1 : 0,
14 artifacts => $arg->{artifacts} || {},
15 235 ▶ }, $class;
Branch: 1 branch
BranchTrueFalseTotal
$arg->{'owned'} ? : 219 16 235
Condition100%2/2
$arg->{'artifacts'} || {}
l!l
15580
MC/DC100%1/1
$arg->{'artifacts'} || {}
$arg->{'artifacts'}
Truth table100%2/2
A
A= $arg->{'artifacts'}
Aresult
11
00
16 }
17  
18 106 ▶sub data { return $_[0]->{data} }
Subroutine data: called CC=1 SCAR=0.0
Pod undocumented
19 62 ▶sub owned { return $_[0]->{owned} }
Subroutine owned: called CC=1 SCAR=0.0
Pod undocumented
20  
21 142 ▶sub apply_to {
Subroutine apply_to: called CC=3 SCAR=11.0
Pod undocumented
22 142 my ( $self, $converter ) = @_;
23 142 ▶ die "Source result requires a converter object\n"
Branch: 1 branch
BranchTrueFalseTotal
unless ref $converter 0 142 142
24 unless ref($converter);
25 142 $converter->{data} = $self->{data};
26 142 ▶ $converter->{_owns_prepared_data} = 1 if $self->{owned};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"owned"} 127 15 142
27 142 return $converter->{data};
28 }
29  
30 616 ▶sub artifact {
Subroutine artifact: called CC=1 SCAR=0.0
Pod undocumented
31 616 my ( $self, $name ) = @_;
32 616 return $self->{artifacts}{$name};
33 }
34  
35 136 1;
« lib/Convert/Pheno/Tabular/Record.pm ↑ Summary lib/Convert/Pheno/CSV.pm »