| 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
Condition0%0/3
builtin::blessed($val) and $val->isa("DBIx::Class::Row")
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")
| |||||||||||||||||||||||||||||
| 18 | 0 | ($_ => $val) | |||||||||||||||||||||||||||
| 19 | } @fields; | ||||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 2 | 1; | |||||||||||||||||||||||||||