« 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
| |||||||||||||||||||||||||||||
| 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
Condition0%0/3
$cols{"data"} and not ref $cols{"data"}
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"}
| |||||||||||||||||||||||||||||
| 25 | 0 | return \%cols; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 2 | 1; | |||||||||||||||||||||||||||