Condition Coverage

lib/DMS/Parser/Emitter.pm
Criterion Covered Total %
condition 36 99 36.3


and 2 conditions

line l !l condition
375 0 0 _is_table($v) and scalar _table_keys($v)
0 0 _is_list($v) and scalar @$v
402 10 0 _is_table($v) and scalar _table_keys($v)
10 0 _is_list($v) and scalar @$v

and 3 conditions

line !l l&&!r l&&r condition
84 2 21 0 not $lite and _contains_unordered($doc->{'body'})
88 2 19 2 not $lite and defined $doc->{'meta'}
21 2 0 not $lite and defined $doc->{'meta'} and _contains_unordered($doc->{'meta'})
159 0 0 21 defined $first and not ref $first
0 21 0 defined $first and not ref $first and $first eq "__fm__"
228 0 0 31 $tied and ref $tied eq "Tie::IxHash"
337 42 1 8 $nc && @{$nc->{'trailing'};}
342 44 0 7 $can_block && !($has_trailing && $self->_is_flow_safe($v, $child_path))
488 30 0 11 $lit_ref and exists $lit_ref->{'integer_lit'}
525 5 0 8 $lit_ref and exists $lit_ref->{'string_form'}
566 0 7 0 $line_start + $kv_indent_spaces < length $bytes and substr($bytes, $line_start + $kv_indent_spaces, 1) eq " "
660 46 0 8 $nc and @{$nc->{'trailing'};}
684 52 9 0 $nc && @{$nc->{'inner'};}
722 0 0 0 $lit and exists $lit->{'string_form'}
0 0 0 $lit and exists $lit->{'string_form'} and $lit->{'string_form'}{'kind'} eq "heredoc"
794 0 0 0 index($k, "'") == -1 and index($k, "\n") == -1
0 0 0 index($k, "'") == -1 and index($k, "\n") == -1 and index($k, "\r") == -1

or 2 conditions

line l !l condition
107 10 11 $self->{'comments_by_path'}{$pk} ||= {"leading", [], "inner", [], "trailing", [], "floating", []}
553 7 0 $form->{'modifiers'} || []

or 3 conditions

line l !l&&r !l&&!r condition
165 2 0 21 $fm_present or $has_fm_comments
306 0 0 0 _is_table($v) && scalar _table_keys($v) || _is_list($v) && scalar @$v
339 3 4 44 _is_table($v) && scalar _table_keys($v) || _is_list($v) && scalar @$v
435 0 0 0 $cls eq "DMS::Parser::OffsetDateTime" or $cls eq "DMS::Parser::LocalDateTime"
0 0 0 $cls eq "DMS::Parser::OffsetDateTime" or $cls eq "DMS::Parser::LocalDateTime" or $cls eq "DMS::Parser::LocalDate"
0 0 0 $cls eq "DMS::Parser::OffsetDateTime" or $cls eq "DMS::Parser::LocalDateTime" or $cls eq "DMS::Parser::LocalDate" or $cls eq "DMS::Parser::LocalTime"
528 5 0 8 not $form or $form->{'kind'} eq "basic"
613 0 0 0 $cls eq "DMS::Parser::OffsetDateTime" or $cls eq "DMS::Parser::LocalDateTime"
0 0 0 $cls eq "DMS::Parser::OffsetDateTime" or $cls eq "DMS::Parser::LocalDateTime" or $cls eq "DMS::Parser::LocalDate"
0 0 0 $cls eq "DMS::Parser::OffsetDateTime" or $cls eq "DMS::Parser::LocalDateTime" or $cls eq "DMS::Parser::LocalDate" or $cls eq "DMS::Parser::LocalTime"
719 0 0 0 ref $v or builtin::blessed($v)
768 0 0 0 $c eq "_" or $c eq "-"