Branch Coverage

blib/lib/Config/General/Match.pm
Criterion Covered Total %
branch 39 48 81.2


line true false branch
684 15 0 if (exists $args{'-MatchSections'} and ref $args{'-MatchSections'} eq 'ARRAY')
813 0 7 if wantarray
833 47 47 if (@_ == 1) { }
852 0 27 unless $$a[0] <=> $$b[0]
860 59 14 if wantarray
873 0 94 unless ($match_sections and ref $match_sections eq 'ARRAY' and @$match_sections)
893 0 224 if (@bad_spec_keys)
898 0 224 unless my $name = $$spec{'-Name'}
899 0 224 unless my $match_type = $$spec{'-MatchType'}
904 10 214 exists $$spec{'-TrimSectionNames'} ? :
906 2 222 if ($$self{'LowerCaseNames'})
913 127 97 if ($target_section_type)
916 0 127 unless $this_section_type
919 71 56 if ($target_section_type ne $this_section_type)
924 11 142 unless exists $$config{$name}
932 223 4 if ($trim_section_names)
936 34 193 if ($match_type =~ /^exact$/i) { }
46 147 elsif ($match_type =~ /^substring$/i) { }
53 94 elsif ($match_type =~ /^regex$/i) { }
94 0 elsif ($match_type =~ /^path$/i or $match_type =~ /^hierarchy$/i) { }
937 5 29 if ($target_string eq $section_string)
951 25 21 if (index($target_string, $section_string) != $[ - 1)
966 23 30 if ($target_string =~ qr/($section_string)/)
986 34 60 if ($section_string =~ /$path_sep$/ and $target_string =~ qr/^($regex)/ or $target_string =~ qr/^($regex)(?:$path_sep|$)/)