lib/Test2/Harness/UI/Schema/ResultBase.pm

filter: Statementstmt 68.4% 13 / 19 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 53.1% 17 / 32 CC 3 SCAR 17.4
CC
3
Cov
54%
get_all_fields
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.7
« lib/Test2/Harness/UI/Controller/Download.pm ↑ Summary lib/Test2/Harness/UI/Util/Errors.pm »
1 package Test2::Harness::UI::Schema::ResultBase;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 2 ▶use Scalar::Util qw/blessed/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use base 'DBIx::Class::Core';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 0 ▶sub get_all_fields {
Subroutine get_all_fields: not called CC=3 SCAR=24.8
Pod undocumented
10 0 my $self = shift;
11 0 my @fields = $self->result_source->columns;
12 return map {
13 0 my $val = $self->$_;
14 # When a belongs_to relationship shares the same name as a FK column,
15 # the accessor returns the related Row object instead of the column
16 # value. Fall back to get_column to get the raw value in that case.
17 0 ▶ $val = $self->get_column($_) if blessed($val) && $val->isa('DBIx::Class::Row');
Branch: 1 branch
BranchTrueFalseTotal
if builtin::blessed($val) and $val->isa("DBIx::Class::Row") 0 0 0
Condition0%0/3
builtin::blessed($val) and $val->isa("DBIx::Class::Row")
!ll&&!rl&&r
000
MC/DC0%0/2
builtin::blessed($val) and $val->isa("DBIx::Class::Row")
builtin::blessed($val) $val->isa("DBIx::Class::Row")
Truth table0%0/3
A and B
A= builtin::blessed($val)B= $val->isa("DBIx::Class::Row")
ABresult
0X0
100
111
18 0 ($_ => $val)
19 } @fields;
20 }
21  
22 2 1;
« lib/Test2/Harness/UI/Controller/Download.pm ↑ Summary lib/Test2/Harness/UI/Util/Errors.pm »