lib/Test2/Harness/UI/Schema/Overlay/RunField.pm

filter: Statementstmt 82.6% 19 / 23 Branchbran 25.0% 1 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 64.1% 25 / 39 CC 3 SCAR 16.3
CC
3
Cov
67%
TO_JSON
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.1
« lib/Test2/Harness/UI/Schema/Overlay/JobField.pm ↑ Summary lib/Test2/Harness/UI/Controller/Query.pm »
1 package Test2::Harness::UI::Schema::Result::RunField;
2 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 ▶use Test2::Harness::Util::JSON qw/decode_json/;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Carp qw/confess/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶confess "You must first load a Test2::Harness::UI::Schema::NAME module"
Branch: 1 branch
BranchTrueFalseTotal
unless $Test2::Harness::UI::Schema::LOADED 0 2 2
10 unless $Test2::Harness::UI::Schema::LOADED;
11  
12 2 our $VERSION = '0.000150';
13  
14 2 __PACKAGE__->inflate_column(
15 data => {
16 inflate => DBIx::Class::InflateColumn::Serializer::JSON->get_unfreezer('data', {}),
17 deflate => DBIx::Class::InflateColumn::Serializer::JSON->get_freezer('data', {}),
18 },
19 );
20  
21 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=3 SCAR=24.8
Pod undocumented
22 0 my $self = shift;
23 0 my %cols = $self->get_all_fields;
24 0 ▶ $cols{data} = decode_json($cols{data}) if $cols{data} && !ref($cols{data});
Branch: 1 branch
BranchTrueFalseTotal
if $cols{"data"} and not ref $cols{"data"} 0 0 0
Condition0%0/3
$cols{"data"} and not ref $cols{"data"}
!ll&&!rl&&r
000
MC/DC0%0/2
$cols{"data"} and not ref $cols{"data"}
$cols{"data"} not ref $cols{"data"}
Truth table0%0/3
A and not(B)
A= $cols{"data"}B= not ref $cols{"data"}
ABresult
0X0
100
111
25 0 return \%cols;
26 }
27  
28 2 1;
« lib/Test2/Harness/UI/Schema/Overlay/JobField.pm ↑ Summary lib/Test2/Harness/UI/Controller/Query.pm »