Branch Coverage

blib/lib/Bible/Reference.pm
Criterion Covered Total %
branch 149 170 87.6


line true false branch
230 2 1 if $books_cb
231 2 1 if $verses_cb
344 4 18 unless $name
349 1 17 unless $bible
369 5 0 $1 == 4 ? :
20 5 $1 == 3 ? :
140 25 $1 == 2 ? :
140 165 $1 == 1 ? :
305 881 $book_str =~ s/^(\d)\s//u ? :
394 1181 189 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
408 1676 4377 @prefix ? :
464 0 202 if $start == 0
465 0 202 if $stop == 0
469 11 191 if $x < $start
476 68 110 $start =~ s/(\d+)://u ? :
477 19 159 $stop =~ s/(\d+)://u ? :
479 1 109 if (not $start_ch and $stop_ch and $start > $stop_ch)
487 2 7 if ($start_ch and $stop_ch and $start and $stop and $start_ch == $stop_ch)
488 1 1 if ($start <= $stop) { }
503 99 79 if (not $start_ch || $stop_ch) { }
62 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) { }
518 4 2 if ($start >= $stop and $stop > $start_ch and not $skip_chapter_assumption_check)
523 4 58 $stop_ch ? :
549 3 4 if ($start_ch >= $stop_ch)
554 11 13 $reversed ? :
560 3 4 $stop_ch - $start_ch > 1 ? :
578 0 180 unless $compress
584 0 22 unless @input
587 1 21 $self->require_book_ucfirst ? :
1 21 $self->require_verse_match ? :
594 1 21 $self->require_book_ucfirst ? :
601 173 335 unless $ref
607 127 208 $ref =~ s/^((?i:\W|\bdna\b|\bro\b|&)+)//u ? :
614 335 151595 if ($ref =~ /$_->[0]/u)
626 159 176 if ($ref =~ /([\d:,;\s\-]+)$/u)
635 143 1031 if $s eq ":" or $d <= $last_d
637 510 664 if ($verse_context) { }
641 127 383 unless @{$numbers->[-1];} > 1
645 510 664 $verse_context ? :
647 127 1047 if $s eq ":"
648 16 1158 if $s eq ";"
652 159 176 if @$numbers
659 335 508 ref $_ ? :
672 4 0 wantarray ? :
676 17 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)
690 209 445 ref $_ ? :
692 165 902 ref $_ ? :
902 0 ref $_ ? :
705 1 55 if $self->add_detail
707 19 20 if (ref $_->[1]) { }
721 55 1 if ($self->sorting)
723 196 210 unless $_->[1]
739 312 596 if @verses
746 121 132 if @$chapters
756 1 55 if ($self->acronyms)
765 1 55 wantarray ? :
776 66 11 unless $_->[1]
780 0 1 wantarray ? :
787 72 120 if (@range)
795 109 384 if (not $last or $last + 1 != $item) { }
807 83 0 wantarray ? :
817 69 96 if ($_->[1]) { }
821 24 52 if (@buffer)
830 70 397 if ($_->[1]) { }
831 11 59 if ($type eq 'verses') { }
11 48 elsif ($type eq 'runs') { }
11 37 elsif ($type eq 'chapters') { }
846 199 198 if ($type eq 'books') { }
855 39 30 if ($type eq 'books') { }
872 0 1 wantarray ? :
877 0 1 wantarray ? :
882 0 1 wantarray ? :
887 40 8 wantarray ? :
896 39 53 ref $_ ? :
900 1 0 @text > 1 && !wantarray ? :
0 1 @text > 1 && wantarray ? :
905 0 3 unless $bible and not ref $bible and length $bible > 0
907 1 2 unless $book_data and ref $book_data eq "ARRAY"
911 0 40 unless ref $_ eq "ARRAY" and not ref $_->[0] and length $_->[0] > 0 and not ref $_->[1] and length $_->[1] > 0
918 0 1 if ($verse_data) { }
932 1 0 if $bible
937 1 1 unless @books
955 1 0 if $bibles->[0]{'count'} != $bibles->[-1]{'count'}