Branch Coverage

blib/lib/ChordPro/Config/Properties.pm
Criterion Covered Total %
branch 111 164 67.6


line true false branch
113 0 24 if (ref $_[1])
150 0 24 $cloning ? :
154 0 0 if ($k eq '_context') { }
0 0 elsif ($k eq '_debug') { }
0 0 elsif ($k eq '_noinc') { }
0 0 elsif ($k eq '_raw') { }
201 0 0 if ($self->{'_debug'})
224 0 27 if ($self->{'_debug'})
260 0 0 if (@_ > 0 or not UNIVERSAL::isa($path, "ARRAY"))
278 0 0 unless $searchpath
282 0 0 unless $path eq ""
286 0 0 unless $file =~ m[^/]
287 0 0 unless -e $cfg
299 0 0 unless $did
308 221 819 if ($value =~ /^'(.*)'\s*$/)
316 0 819 if ($self->{'_raw'} and $value =~ /^(null|false|true)$/)
320 15 804 if (lc $value eq "null")
323 4 800 if (lc $value eq "true")
326 23 777 if (lc $value eq "false")
330 167 610 if ($value =~ /^"(.*)"\s*$/)
340 2 165 if $noexpand
344 502 108 if $noexpand
352 9 18 $context ? :
362 226 647 if /^\s*#/
363 36 611 unless /\S/
371 0 611 if (/^include\s+((?![=:]).+)/ and not $self->{'_noinc'})
388 48 563 if (/^($keypat)\s*([{])$/)
390 0 48 $2 eq '[' ? :
391 13 35 unless @stack
395 9 554 if (/^($keypat)\s*[:=]\s*([[])$/)
397 9 0 $2 eq '[' ? :
398 1 8 unless @stack
417 12 542 if (/^($keypat)\s*[:=]\s*\[(.*)\]$/)
419 9 3 if @stack
428 3 9 unless $ix
432 10 0 if (/^\s*\[(.*)\]$/ and @stack and $stack[0][1])
448 7 258 if (@stack and defined $stack[0][1] and /^([{\[])$/)
450 0 7 $1 eq '[' ? :
458 64 461 if (/^([}\]])$/)
459 0 64 $1 eq defined $stack[0][1] ? :
0 64 unless @stack and $1 eq defined $stack[0][1] ? "]" : "}"
471 438 23 if (/^($keypat)\s*[=:]\s*(.*)/)
472 0 438 if $2 eq "{"
478 171 267 if @stack
487 23 0 if (@stack and defined $stack[0][1])
506 9 18 $context ? :
0 27 if @stack != ($context ? 1 : 0)
543 0 4 if ($context_only = $prop =~ s/^\.// and not $ctx)
546 0 4 if (defined $ctx)
547 0 0 if $ctx
548 0 0 if (exists $self->{'_props'}{$ctx . $prop})
553 0 4 if ($context_only)
557 4 0 if (defined $self->{'_props'}{$prop} and $self->{'_props'}{$prop} ne "")
578 0 3 unless defined $ret or $nargs == 3
594 0 0 if $prop
607 91 671 unless $ret
608 0 671 if $self->{'_debug'}
618 214 457 if $ctx
624 0 14 if $self->{'_debug'}
629 3 11 if $key =~ /^(.*?):(.*)/
634 1 13 if (exists $ENV{$key}) { }
636 0 1 if $checkdef
640 3 10 if ord $key == 46
642 2 11 if ($checkdef) { }
6 5 elsif (defined $$props{lc $key} and $$props{lc $key} ne '') { }
671 1466 194 if (exists $props->{$p}) { }
673 510 956 unless index(join("\0", "", @{$props->{$p};}, ""), "\0" . $last . "\0") >= 0
753 659 13 if $cur ne ""
756 175 497 if (my $res = $self->{'_props'}{lc $all}) { }
757 62 113 if (_check_array($res)) { }
774 485 12 if defined $val
782 113 62 unless join($", @i) =~ /^[\d ]+$/
785 0 238 unless $_ eq "$ref"
811 0 12 if $fh
827 335 12 if $cur
831 90 257 if (my $res = $self->{'_props'}{lc $all})
832 75 15 if @$res > 1
835 78 257 if defined $t and $t ne ""
837 0 335 if $dump_expanded
838 89 246 if (not defined $val) { }
1 245 elsif ($val =~ /[\n\t]/) { }
839 12 77 unless defined $t and $t ne ""