Branch Coverage

blib/lib/Log/Log4perl/Layout/JSON.pm
Criterion Covered Total %
branch 47 58 81.0


line true false branch
45 13 5 unless $self->include_mdc
49 2 3 if (my $mdc_field = $self->name_for_mdc) { }
51 3 2 unless %$mdc_hash
57 0 10 unless $self->canonical
68 0 1 unless ($self->exclude_message)
97 18 0 if (my $arg = $args->{'canonical'})
101 17 1 if ($args->{'field'})
108 1 17 if (my $arg = $args->{'utf8'})
116 84 42 unless my $arg = delete $args->{$arg_name}
121 0 18 if %$args
130 0 18 if $last_render_error
145 166 24 if (&blessed($value) and &blessed($value) eq 'Log::Log4perl::Layout::PatternLayout') { }
20 4 elsif (ref $value eq 'HASH') { }
4 0 elsif (ref $value eq 'CODE') { }
165 74 12 if (exists $value->{'value'} and not ref $value->{'value'}) { }
2 10 elsif (exists $value->{'value'} and ref $value->{'value'} ne 'HASH') { }
188 2 40 if (ref $message eq 'ARRAY' and @{$message;} > 1 and @{$message;} % 2 == 0) { }
1 39 elsif (ref $message eq 'ARRAY') { }
209 2 40 if ($m eq 'WARP_MESSAGE_0')
211 2 4 if ($fields[$i] eq 'message')
230 6 42 if length $json > $max_json_length
233 6 42 if ($@)
248 0 45 if (ref $v) { }
250 0 0 unless (defined $encoded)
260 42 3 if $len <= $max_json_length / 2
262 0 3 if (ref $v) { }
274 2 4 if (@truncated) { }
297 6 0 if @fields
303 6 36 if ($self->format_prefix) { }