Branch Coverage

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


line true false branch
739 8960 2 @_ ? :
740 3043 5919 @_ ? :
744 6 8956 unless defined $name
765 8039 917 if ($mode ne "given")
788 6944 1095 if $mode eq "family" or index($name, ",") != -1
789 312 7727 if $name =~ / v$apostrophe| ha$hyphen(?:Kohein|Levi|Rav)\b/u
791 615 7424 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 6061 2895 if ($mode eq "full")
810 5000 1061 if $has_comma
811 1061 5000 unless $has_comma
816 36 8920 if ($need_case_update)
818 2 34 unless %namecase_exceptions
832 917 2 @_ ? :
841 1890 2 @_ ? :
852 4 36 unless defined $name
855 2 34 unless length $name
860 26 8 if ($has_comma) { }
898 4031 2 @_ ? :
902 2 4031 unless defined $name
903 6 4025 unless length $name
912 125 3900 if exists $namesplit_exceptions{$kcname}
916 1891 2134 if index($name, ",") != -1
920 2 2132 unless %split_starter
921 2 2132 unless $split_starter_re
925 2 2132 unless (scalar %family_names_ck)
934 2 2132 unless (scalar %family_names_ck_roman)
944 2 2132 unless (scalar %family_names_v_roman)
953 56 2078 if defined $g
956 16 2062 if defined $g
961 96 1966 if @words < 2 and not $name =~ /^[\p{Han}\p{Hangul}\p{Hiragana}\p{Katakana}]+$/u
966 836 1390 unless exists $split_starter{$kcstarter}
967 24 1366 if $kcstarter eq "ben" and not $name =~ / v$apostrophe| ha$hyphen(?:Kohein|Levi|Rav)\b/iu
968 12 1354 if $kcstarter eq "bean" and not $name =~ /\bbean $irish_post_bean_re\b/iu
969 12 1342 if $i == $#words
971 24 1318 if $i > 1 and $kcstarter =~ /^[yi]$/iu
979 44 580 if defined $g
992 44 536 if defined $g
995 28 508 if defined $g
999 34 474 if ($name =~ /^[\p{Han}\p{Hiragana}\p{Katakana}]+$/u)
1001 1 33 unless ($ja_loaded)
1022 4 43 unless defined $name
1025 2 41 unless length $name
1028 2 39 unless $has_comma
1032 7 32 if ("$f$g" =~ /^[\p{Han}\p{Hangul}\p{Hiragana}\p{Katakana}]+$/u) { }
1056 1843 2 @_ ? :
1058 8 1837 unless defined $name and length $name
1069 4 19 unless defined $g
1070 2 17 unless defined $f
1072 6 11 if "$f$g" =~ /^[\p{Han}\p{Hangul}\p{Hiragana}\p{Katakana}]+$/u
1080 13078 2 @_ ? :
1082 2 13078 unless defined $name
1104 9 2 if defined $namecase_exceptions_re