Branch Coverage

blib/lib/Bible/Reference.pm
Criterion Covered Total %
branch 144 164 87.8


line true false branch
659 4 15 unless $name
663 1 14 unless $bible
683 4 0 $1 == 4 ? :
16 4 $1 == 3 ? :
113 20 $1 == 2 ? :
113 133 $1 == 1 ? :
246 713 $book_str =~ s/^(\d)\s//u ? :
708 959 79 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
722 1350 3576 @prefix ? :
778 0 202 if $start == 0
779 0 202 if $stop == 0
783 11 191 if $x < $start
790 68 110 $start =~ s/(\d+)://u ? :
791 19 159 $stop =~ s/(\d+)://u ? :
793 1 109 if (not $start_ch and $stop_ch and $start > $stop_ch)
801 2 7 if ($start_ch and $stop_ch and $start and $stop and $start_ch == $stop_ch)
802 1 1 if ($start <= $stop) { }
817 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) { }
832 4 2 if ($start >= $stop and $stop > $start_ch and not $skip_chapter_assumption_check)
837 4 58 $stop_ch ? :
863 3 4 if ($start_ch >= $stop_ch)
868 11 13 $reversed ? :
874 3 4 $stop_ch - $start_ch > 1 ? :
892 0 180 unless $compress
898 0 19 unless @input
901 1 18 $self->require_book_ucfirst ? :
1 18 $self->require_verse_match ? :
908 1 18 $self->require_book_ucfirst ? :
915 164 328 unless $ref
921 127 201 $ref =~ s/^((?i:\W|\bdna\b|\bro\b|&)+)//u ? :
928 328 147968 if ($ref =~ /$_->[0]/u)
940 159 169 if ($ref =~ /([\d:,;\s\-]+)$/u)
949 143 1031 if $s eq ":" or $d <= $last_d
951 510 664 if ($verse_context) { }
955 127 383 unless @{$numbers->[-1];} > 1
959 510 664 $verse_context ? :
961 127 1047 if $s eq ":"
962 16 1158 if $s eq ";"
966 159 169 if @$numbers
973 328 492 ref $_ ? :
986 4 0 wantarray ? :
990 14 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)
1004 209 438 ref $_ ? :
1006 165 902 ref $_ ? :
902 0 ref $_ ? :
1019 1 52 if $self->add_detail
1021 19 20 if (ref $_->[1]) { }
1035 52 1 if ($self->sorting)
1037 189 210 unless $_->[1]
1053 312 596 if @verses
1060 121 125 if @$chapters
1070 1 52 if ($self->acronyms)
1079 1 52 wantarray ? :
1090 66 11 unless $_->[1]
1094 0 1 wantarray ? :
1101 72 120 if (@range)
1109 109 384 if (not $last or $last + 1 != $item) { }
1121 83 0 wantarray ? :
1131 69 89 if ($_->[1]) { }
1135 24 52 if (@buffer)
1144 70 397 if ($_->[1]) { }
1145 11 59 if ($type eq 'verses') { }
11 48 elsif ($type eq 'runs') { }
11 37 elsif ($type eq 'chapters') { }
1160 199 198 if ($type eq 'books') { }
1169 39 30 if ($type eq 'books') { }
1186 0 1 wantarray ? :
1191 0 1 wantarray ? :
1196 0 1 wantarray ? :
1201 40 5 wantarray ? :
1210 39 53 ref $_ ? :
1214 1 0 @text > 1 && !wantarray ? :
0 1 @text > 1 && wantarray ? :
1219 0 3 unless $bible and not ref $bible and length $bible > 0
1221 1 2 unless $data and ref $data eq "ARRAY"
1225 0 40 unless ref $_ eq "ARRAY" and not ref $_->[0] and length $_->[0] > 0 and not ref $_->[1] and length $_->[1] > 0
1238 1 0 if $bible
1243 1 1 unless @books
1262 1 0 if $bibles->[0]{'count'} != $bibles->[-1]{'count'}