Branch Coverage

blib/lib/Lingua/Sentence.pm
Criterion Covered Total %
branch 24 36 66.6


line true false branch
16 0 7 unless $lang_id and $lang_id =~ /^[a-z][a-z]$/i
23 1 6 if (defined $prefix_file) { }
24 0 1 unless (-e $prefix_file)
35 1 6 unless (-e $prefix_file)
44 7 0 if ($pt->is_file) { }
46 31 2856 unless $line
47 60 2796 if substr($line, 0, 1) eq '#'
48 10 2786 if ($line =~ /^(.*?)\s+#NUMERIC_ONLY#/) { }
65 0 8 unless (ref $self)
69 0 8 unless ($text)
77 0 5 unless (ref $self)
81 0 5 unless ($text)
115 13 122 if ($words[$i] =~ /([\p{IsAlnum}\.\-]*)([\'\"\)\]\%\p{IsPf}]*)(\.+)$/)
120 2 11 if ($prefix and $self->{'Nonbreaking'}{$prefix} and $self->{'Nonbreaking'}{$prefix} == 1 and not $starting_punct) { }
0 11 elsif ($words[$i] =~ /(\.)[\p{IsUpper}\-]+(\.+)$/) { }
11 0 elsif ($words[$i + 1] =~ /^([ ]*['"([\x{00bf}\x{00A1}\p{IsPi}]*[ ]*[\p{IsUpper}0-9])/) { }
138 0 0 unless $prefix and $self->{'Nonbreaking'}{$prefix} and $self->{'Nonbreaking'}{$prefix} == 2 and not $starting_punct and $words[$i + 1] =~ /^[0-9]+/
160 13 0 unless $text =~ /\n$/