Branch Coverage

blib/lib/Bible/Reference.pm
Criterion Covered Total %
branch 158 180 87.7


line true false branch
232 6 1 if $books_cb
233 6 1 if $verses_cb
347 6 21 unless $name
352 1 20 unless $bible
372 5 0 $1 == 4 ? :
24 5 $1 == 3 ? :
170 29 $1 == 2 ? :
170 199 $1 == 1 ? :
369 1049 $book_str =~ s/^(\d)\s//u ? :
397 1413 214 if length $unique >= $self->minimum_book_length and !@prefix && scalar grep({index($_, $unique) == 0;} @$canonical) == 1 || @prefix && scalar grep({index($_, $prefix[-1] . ' ' . $unique) == 0;} @$canonical) == 1
411 2028 5162 @prefix ? :
467 0 213 if $start == 0
468 0 213 if $stop == 0
472 11 202 if $x < $start
479 77 112 $start =~ s/(\d+)://u ? :
480 19 170 $stop =~ s/(\d+)://u ? :
482 1 111 if (not $start_ch and $stop_ch and $start > $stop_ch)
490 2 7 if ($start_ch and $stop_ch and $start and $stop and $start_ch == $stop_ch)
491 1 1 if ($start <= $stop) { }
506 101 88 if (not $start_ch || $stop_ch) { }
71 17 elsif ($start_ch and not $stop_ch) { }
10 7 elsif (not $start_ch and $stop_ch) { }
7 0 elsif ($start_ch and $stop_ch) { }
521 4 2 if ($start >= $stop and $stop > $start_ch and not $skip_chapter_assumption_check)
526 4 67 $stop_ch ? :
552 3 4 if ($start_ch >= $stop_ch)
557 11 13 $reversed ? :
563 3 4 $stop_ch - $start_ch > 1 ? :
581 0 187 unless $compress
587 0 26 unless @input
590 1 25 $self->require_book_ucfirst ? :
1 25 $self->require_verse_match ? :
597 1 25 $self->require_book_ucfirst ? :
604 175 341 unless $ref
610 129 212 $ref =~ s/^((?i:\W|\bdna\b|\bro\b|&)+)//u ? :
619 341 154572 if ($ref =~ /$_->[0]/u)
631 166 175 if ($ref =~ /([\d:,;\s\-]+)$/u)
640 154 1268 if $s eq ":" or $d <= $last_d
642 737 685 if ($verse_context) { }
646 138 599 unless @{$numbers->[-1];} > 1
650 737 685 $verse_context ? :
652 138 1284 if $s eq ":"
653 23 1399 if $s eq ";"
657 340 1 if (@$numbers or not $self->require_chapter_match) { }
658 166 174 if @$numbers
669 340 516 ref $_ ? :
682 4 0 wantarray ? :
686 20 0 if ($data or not $self->_cache->{'data'} or not $self->_cache->{'sorting'} && $self->_cache->{'sorting'} == $self->sorting && $self->_cache->{'acronyms'} && $self->_cache->{'acronyms'} == $self->acronyms)
700 216 450 if (ref $_) { }
702 176 923 if (ref $_) { }
923 0 if (ref $_) { }
715 3 57 if $self->add_detail
717 23 20 if (ref $_->[1]) { }
731 58 2 if ($self->sorting)
733 194 216 unless $_->[1]
749 331 597 if @verses
756 127 130 if @$chapters
767 2 58 if $self->simplify
769 4 0 if (my $chapters = $_->[1])
774 18 0 if $chapter->[1] and join(",", @{$chapter->[1];}) eq join(",", 1 .. $self->_bible_data->{'lengths'}{$book}[$chapter->[0] - 1] || 0)
780 2 2 if join(",", map({$_->[0];} grep({@$_ == 1;} @$chapters))) eq join(",", 1 .. scalar @{$self->_bible_data->{'lengths'}{$book};})
787 1 59 if ($self->acronyms)
796 1 59 wantarray ? :
807 66 11 unless $_->[1]
811 0 1 wantarray ? :
818 74 128 if (@range)
826 114 390 if (not $last or $last + 1 != $item) { }
838 88 0 wantarray ? :
848 74 96 if ($_->[1]) { }
852 27 56 if (@buffer)
861 72 406 if ($_->[1]) { }
862 11 61 if ($type eq 'verses') { }
11 50 elsif ($type eq 'runs') { }
11 39 elsif ($type eq 'chapters') { }
877 208 198 if ($type eq 'books') { }
886 44 30 if ($type eq 'books') { }
903 0 1 wantarray ? :
908 0 1 wantarray ? :
913 0 1 wantarray ? :
918 45 7 wantarray ? :
927 40 56 if (ref $_) { }
931 1 1 @text > 1 && !wantarray ? :
0 2 @text > 1 && wantarray ? :
936 0 3 unless $bible and not ref $bible and length $bible > 0
938 1 2 unless $book_data and ref $book_data eq "ARRAY"
942 0 40 unless ref $_ eq "ARRAY" and not ref $_->[0] and length $_->[0] > 0 and not ref $_->[1] and length $_->[1] > 0
949 0 1 if ($verse_data) { }
963 1 0 if $bible
968 1 1 unless @books
986 1 0 if $bibles->[0]{'count'} != $bibles->[-1]{'count'}