Branch Coverage

blib/lib/YAML/yq/Helper.pm
Criterion Covered Total %
branch 0 154 0.0


line true false branch
49 0 0 if ($? != 0)
53 0 0 unless (defined $opts{'file'})
57 0 0 unless (-e $opts{'file'})
61 0 0 unless (-f $opts{'file'})
65 0 0 unless (-r $opts{'file'})
78 0 0 if ($raw =~ /^\%YAML\ 1\.1/) { }
0 0 elsif ($raw =~ /^\%YAML\ 1\.1/) { }
106 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
113 0 0 if ($self->is_array_clear("var", $opts{'var'}))
117 0 0 unless ($opts{'var'} =~ /\[\]$/)
142 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
149 0 0 if ($self->is_hash_clear("var", $opts{'var'}))
153 0 0 unless ($opts{'var'} =~ /\[\]$/)
180 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
188 0 0 if (not $self->is_defined('var', $opts{'var'})) { }
195 0 0 unless ($opts{'var'} =~ /\[\]$/)
225 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
233 0 0 if (not $self->is_defined('var', $opts{'var'})) { }
257 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
264 0 0 unless ($self->is_defined("var", $opts{'var'}))
289 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
296 0 0 unless ($self->is_defined("var", $opts{'var'}))
300 0 0 unless ($self->is_array("var", $opts{'var'}))
304 0 0 if ($opts{'var'} =~ /\[\]$/)
329 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
336 0 0 unless ($self->is_defined("var", $opts{'var'}))
340 0 0 unless ($self->is_hash("var", $opts{'var'}))
344 0 0 if ($opts{'var'} =~ /\[\]$/)
365 0 0 unless ($self->{'ensure'})
372 0 0 if ($raw =~ /^\%YANL/)
377 0 0 unless ($raw =~ /^\-\-\-\n/)
384 0 0 unless write_file($self->{'file'}, $raw)
405 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
413 0 0 if ($string =~ /\[\]/) { }
0 0 elsif ($string =~ /\{\}/) { }
0 0 elsif ($string eq "null\n") { }
425 0 0 if ($@)
429 0 0 if (ref $yaml eq "ARRAY")
452 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
459 0 0 unless ($self->is_array("var", $opts{'var'}))
464 0 0 if ($string =~ /\[\]/)
489 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
498 0 0 if ($string eq "null\n")
523 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
532 0 0 if ($string =~ /\[\]/) { }
0 0 elsif ($string =~ /\{\}/) { }
0 0 elsif ($string eq "null\n") { }
544 0 0 if (ref $yaml eq "HASH")
569 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
576 0 0 unless ($self->is_hash("var", $opts{'var'}))
581 0 0 if ($string =~ /\{\}/)
609 0 0 unless (defined $opts{'vals'})
613 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
621 0 0 if ($self->is_defined('var', $opts{'var'})) { }
628 0 0 unless ($opts{'var'} =~ /\[\]$/)
665 0 0 if (not defined $opts{'hash'}) { }
669 0 0 if (ref $opts{'hash'} ne "HASH")
676 0 0 if (defined $opts{'hash'}{$key} and ref $opts{'hash'}{$key} ne "SCALAR" and ref $opts{'hash'}{$key} ne "")
689 0 0 if (not defined $opts{'var'}) { }
0 0 elsif (not $opts{'var'} =~ /^\./) { }
696 0 0 if ($opts{'var'} =~ /\[\]$/)
700 0 0 unless ($opts{'var'} =~ /\.$/)
705 0 0 if (not $self->is_defined('var', $opts{'var'})) { }
714 0 0 if (defined $opts{'hash'}{$key}) { }