Branch Coverage

blib/lib/Lingua/Identify.pm
Criterion Covered Total %
branch 49 62 79.0


line true false branch
169 7 182 unless /^[A-Z][A-Z]$/
171 0 182 if ($languages{'_versions'}{lc $_} < 0.02)
173 0 0 if exists $languages{$k}{lc $_}
207 41 29 if ref $_[0] eq 'HASH'
326 11 59 defined $config{'method'} ? :
330 2 68 defined $config{'max-size'} ? :
335 1 1 wantarray ? :
2 68 unless $text
338 1 67 if ($maxsize < length $text and $maxsize != 0)
340 0 1 defined $config{'extract_from'} ? :
344 1 0 if ($_ eq 'head' or $_ eq 'tail') { }
366 7 61 if ($config{'mode'} eq 'dummy')
382 58 171 if (/^smallwords$/) { }
56 115 elsif (/^(prefixes[1-4])$/) { }
59 56 elsif (/^(suffixes[1-4])$/) { }
56 0 elsif (/^(ngrams[1-4])$/) { }
403 1040 0 $total ? :
408 60 1 wantarray ? :
415 1 10 if (/^HASH$/) { }
1 9 elsif (/^ARRAY$/) { }
464 2 28 if (ref $_[0] eq 'HASH')
482 0 30 defined $config{'max-size'} ? :
490 1 30 if (exists $config{'encoding'}) { }
491 0 1 unless open FILE, "<:encoding($config{'encoding'})", $file
493 0 30 unless open FILE, '<:utf8', $file
553 3 57 unless defined $_[1] and $_[1]
554 1 56 unless defined $_[3] and $_[3]
593 15746 100394 if (exists $$elements{$_})
602 3154 0 $total ? :
607 229 0 wantarray ? :
750 1 0 unless (grep {$_ eq $_[0];} @active_languages)