Branch Coverage

blib/lib/Lingua/NameUtils.pm
Criterion Covered Total %
branch 114 114 100.0


line true false branch
739 8966 2 @_ ? :
740 3043 5925 @_ ? :
744 6 8962 unless defined $name
765 8045 917 if ($mode ne "given")
788 6944 1101 if $mode eq "family" or index($name, ",") != -1
789 312 7733 if $name =~ / v$apostrophe| ha$hyphen(?:Kohein|Levi|Rav)\b/u
791 615 7430 if ($mode eq "full" and %namecase_exceptions_full)
794 234 381 if exists $namecase_exceptions_full{$kcfull}
797 108 1870 if ($mode eq "family" and defined $given_names and %fnamecase_exceptions_full)
800 50 58 if exists $fnamecase_exceptions_full{$kcfull}
807 6067 2895 if ($mode eq "full")
810 5000 1067 if $has_comma
811 1067 5000 unless $has_comma
816 37 8925 if ($need_case_update)
818 2 35 unless %namecase_exceptions
832 917 2 @_ ? :
841 1890 2 @_ ? :
852 4 37 unless defined $name
855 2 35 unless length $name
860 26 9 if ($has_comma) { }
872 1 8 unless %namecase_exceptions
899 4037 2 @_ ? :
903 2 4037 unless defined $name
904 6 4031 unless length $name
913 125 3906 if exists $namesplit_exceptions{$kcname}
917 1891 2140 if index($name, ",") != -1
921 2 2138 unless %split_starter
922 2 2138 unless $split_starter_re
926 2 2138 unless (scalar %family_names_ck)
935 2 2138 unless (scalar %family_names_ck_roman)
945 2 2138 unless (scalar %family_names_v_roman)
954 56 2084 if defined $g
957 16 2068 if defined $g
962 96 1972 if @words < 2 and not $name =~ /^[\p{Han}\p{Hangul}\p{Hiragana}\p{Katakana}]+$/u
967 836 1390 unless exists $split_starter{$kcstarter}
968 24 1366 if $kcstarter eq "ben" and not $name =~ / v$apostrophe| ha$hyphen(?:Kohein|Levi|Rav)\b/iu
969 12 1354 if $kcstarter eq "bean" and not $name =~ /\bbean $irish_post_bean_re\b/iu
970 12 1342 if $i == $#words
972 24 1318 if $i > 1 and $kcstarter =~ /^[yi]$/iu
980 44 586 if defined $g
993 44 542 if defined $g
996 28 514 if defined $g
1000 40 474 if ($name =~ /^[\p{Han}\p{Hiragana}\p{Katakana}]+$/u)
1002 1 39 unless ($ja_loaded)
1024 4 43 unless defined $name
1027 2 41 unless length $name
1030 2 39 unless $has_comma
1034 7 32 if ("$f$g" =~ /^[\p{Han}\p{Hangul}\p{Hiragana}\p{Katakana}]+$/u) { }
1058 1846 2 @_ ? :
1060 8 1840 unless defined $name and length $name
1071 4 19 unless defined $g
1072 2 17 unless defined $f
1074 6 11 if "$f$g" =~ /^[\p{Han}\p{Hangul}\p{Hiragana}\p{Katakana}]+$/u
1082 13095 2 @_ ? :
1084 2 13095 unless defined $name
1106 9 2 if defined $namecase_exceptions_re
1109 9 2 if defined $split_starter_re