Branch Coverage

blib/lib/Text/Names.pm
Criterion Covered Total %
branch 100 168 59.5


line true false branch
699 0 8 unless $namesInitialized
704 1 6 unless $namesInitialized
725 0 11 unless $namesInitialized
727 2 9 if ($name =~ /[,\s]/)
734 1 10 unless $fscore or $mscore
735 3 7 if $fscore and not $mscore
736 0 7 if $mscore and not $fscore
743 1 6 if $fscore / $mscore >= $threshold
744 4 2 if $mscore / $fscore >= $threshold
748 0 2 if ($fem_end) { }
749 0 0 if $fscore / $mscore >= $threshold / 4
751 2 0 if $mscore / $fscore >= $threshold / 4
759 0 999 unless $n =~ /^(.+?)\s+(.+?)\s/
763 0 1219 unless $n =~ /^(.+?)\s+(.+?)\s/
767 0 4275 unless $n =~ /^(.+?)\s+(.+?)\s/
775 0 0 unless defined $n
783 57 1 if $given
792 0 123 unless defined $in
819 0 116 unless defined $in
832 7 109 if (not $in =~ /,/ and $in =~ /^(.*?\s)((?:[A-Z][\-\.\s]{0,2}){1,3})$/) { }
0 109 elsif ($in =~ /^[^,]+\s\w\.?$/) { }
851 67 49 if ($in =~ /(.*),\s*(.*)/) { }
856 0 49 if ($#bits == -1)
860 0 49 if ($lastname =~ /^Jr\.?$/i and $#bits > -1)
864 3 46 if $jr
896 0 38 unless defined $in
908 1 37 if ($in =~ /;/) { }
14 23 elsif (not $in =~ /,/) { }
922 4 19 if ($in =~ /$AND/i) { }
930 0 4 if ($t =~ /,.+,.+,.+$AND/)
942 0 4 if ($in =~ /$AND.*,/i) { }
956 3 16 if ($in =~ /,.+,/) { }
962 12 4 unless $tok =~ /[\w\.]${SPACE}[\w\.]/i
965 3 0 if ($silly >= 2 and $#tokens % 2 == 1)
986 14 5 if ($#bits <= 0)
1005 0 38 if (defined $_[-1] and $_[-1] eq 'reverse')
1015 38 57 unless $_
1016 2 55 if (/^([A-Z](\.|\s|$)\s?)+$/ and $#new > -1) { }
1017 0 2 if ($new[-1] =~ /,/) { }
1027 0 55 unless $a
1029 0 55 $reverse ? :
1037 0 0 unless defined $in
1042 0 0 if ($l =~ s/\s+(Jr\.?|[IV]{2,10})\s*$//)
1048 0 0 if ($f =~ /^\s*([A-Z](?:\.|\s|$))(.+)$/) { }
1055 0 0 if ($f =~ /^([^\s]+?)\s+((?:[A-Z](?:\.|\s+|$)\s*)+)$/)
1066 2 7 unless $ABBREVIATIONS_LC{lc $a}
1067 7 0 $ABBREVIATIONS_LC{lc $a}{lc $b} ? :
1073 0 14 unless defined $a and defined $b
1079 14 0 if defined $lasta
1080 14 0 if defined $lastb
1083 2 12 unless (equivtext($lasta, $lastb))
1084 1 1 if (not $opts{'loose'}) { }
1112 2 17 if ($i > $#at) { }
1 16 elsif ($i > $#bt) { }
1124 13 3 if (not equivtext($at[$i], $bt[$i])) { }
1127 3 10 unless equivtext(substr($at[$i], 0, 1), substr($bt[$i], 0, 1))
1132 5 5 if (length $at[$i] > 2) { }
1134 4 1 if (length $bt[$i] > 2) { }
1135 3 1 if (abbreviationOf($at[$i], $bt[$i])) { }
1 0 elsif (abbreviationOf($bt[$i], $at[$i])) { }
1153 5 0 if length $bt[$i] > 2
1178 21 22 length $a > 1 && length $b > 1 ? :
1192 0 58 unless defined $n
1201 0 58 if ($n =~ s/^\s*,\s+//)
1204 0 58 if ($n =~ s/^([^,]+?)\s*,\s*$/$1/)
1236 0 58 if $n =~ m[http://]
1239 2 56 unless ($n =~ /[A-Z]/)
1244 5 53 unless ($n =~ /,/ or $n =~ /\w \w/)
1250 58 0 if ($n =~ /[a-z]/ and not $n =~ /[A-Z]{2, } [A-Z]{2,}/) { }
1269 1 5 if grep {lc $_ eq lc $s;} @NAME_PREFIXES
1282 0 0 if (scalar @first_parts > 3)
1292 0 0 if $value =~ s/(\w)[^\s\.]+/$1./
1295 0 0 if $first =~ /(\w)[^\s\.]+/
1318 0 0 if (scalar @parts < 3) { }
1323 0 0 if $variation =~ /-/ and $alias =~ / /
1324 0 0 if $variation =~ / / and $alias =~ /-/
1325 0 0 unless $variation =~ /-/ or $alias =~ /-/
1326 0 0 unless $variation =~ / / or $alias =~ / /
1336 0 0 if $reduced
1341 0 0 if (scalar @aliases > 25)
1353 0 0 if (scalar @parts <= 1) { }
1374 0 86 unless defined $_
1438 56 4 unless $txt =~ /\b[A-Z]{2,}\b/ or $txt =~ /\b[a-z]{4,}\b/
1440 4 0 if ($args{'notSentence'})