Branch Coverage

blib/lib/Wiktionary/Parser/Document.pm
Criterion Covered Total %
branch 46 132 34.8


line true false branch
33 20 1 if ($sections and @$sections)
53 0 81 unless ($section->isa('Wiktionary::Parser::Section'))
61 40 41 unless ($section->get_document)
78 0 0 if ($title)
82 0 0 unless $self->get_section('number', $number)->get_header =~ /$title/i
99 0 0 unless $title
103 0 0 unless $sections and @$sections
107 0 0 unless $section->get_child_sections
123 0 0 unless my $language = $args{'language'}
128 0 0 unless $self->get_section('number', $number)->get_header =~ /^$language$/i
132 0 0 if ($section)
144 298 0 if ($number)
159 0 41 if ($self->get_title =~ /^Wikisaurus\:/) { }
2 39 elsif ($header =~ /translation/i) { }
6 33 elsif ($header =~ /etymology/i) { }
0 33 elsif ($header =~ /synonym/i) { }
0 33 elsif ($header =~ /hypernym/i) { }
0 33 elsif ($header =~ /hyponym/i) { }
0 33 elsif ($header =~ /antonym/i) { }
4 29 elsif ($header =~ /pronunciation/i) { }
0 29 elsif ($header =~ /alternat\w+ form/i) { }
2 27 elsif ($header =~ /derived\sterm/i) { }
12 15 elsif ($self->is_part_of_speech($header)) { }
244 0 40 unless $self->get_section('number', $number)->isa($type)
253 0 22 unless $$self{'sections'}
262 0 0 defined $args{'_meta_follow_links'} ? :
267 0 0 unless $sections
270 0 0 unless $word_senses
272 0 0 if (my($title) = $word_sense->get_word =~ /^wiktionary\:(.+)$/i)
273 0 0 if ($_meta_follow_links)
332 0 0 if ($$self{"__get_${class}__"})
339 0 0 unless $sections
341 0 0 unless $x_nyms
346 0 0 unless $$x_nym{'lexemes'}
356 0 0 if ($lexeme =~ /^Wikisaurus:/) { }
360 0 0 unless $ws_sections
362 0 0 unless $word_list
388 0 0 unless $sections
391 0 0 unless $$hr{$language}
407 0 0 unless $sections
462 0 0 if ($$self{'__get_parts_of_speech__'})
469 0 0 unless $sections
472 0 0 unless $pos and $lang_code
486 1 19 defined $args{'include_transliterations'} ? :
487 0 20 defined $args{'include_alternate_translations'} ? :
490 0 20 defined $args{'_meta_follow_links'} ? :
496 0 20 unless $sections
499 0 40 unless $word_senses
504 0 20 if (my($title) = $word_sense->get_word =~ /^wiktionary\:(.+)$/i)
506 0 0 if ($_meta_follow_links)
515 0 0 if ($linked_document)
520 0 0 unless $$linked_translations{$linked_word_sense}
522 0 0 unless $$linked_translations{$linked_word_sense}{$linked_lang_code}{'translations'}
532 0 20 unless $translations
544 25 12 if ($tagged_language_code)
553 14 23 if ($include_transliterations and $lexeme->get_transliteration)
556 0 37 if ($include_alternate_translations and $lexeme->get_alternate)
562 0 107 unless defined $lex
563 19 88 unless $translations{$word_sense_lexeme}{$language_code}{'translations'}
48 59 unless (grep {$_ eq $lex;} @{[] unless $translations{$word_sense_lexeme}{$language_code}{'translations'};})
581 32 35 if grep {$header =~ /^$_$/i;} 'noun', 'verb', 'adjective', 'adverb', 'pronoun', 'preposition', 'article', 'conjunction', 'determiner', 'interjection', 'symbol'
606 0 0 if ($$self{'linked_documents'}{$title})
613 0 0 unless $parser
634 0 0 unless my $sections = $args{'sections'}
641 0 0 unless $$self{'verbose'}
678 33 7 if $number =~ /\./