Branch Coverage

blib/lib/Catmandu/Paged.pm
Criterion Covered Total %
branch 49 68 72.0


line true false branch
38 4 32 if (my $max_offset = $self->maximum_offset)
39 4 0 if $total > $max_offset
57 2 2 $max_pages < $total_pages - 1 ? :
59 2 2 if ($total_pages - 1 <= $max_pages) { }
69 1 1 if ($current_page - $q_size[0] < 1) { }
1 0 elsif ($current_page - $q_size[1] - _ceil($q_size[1] / 3) <= $q_size[0]) { }
0 0 elsif ($current_page + $q_size[3] >= $total_pages) { }
0 0 elsif ($current_page + $q_size[2] >= $total_pages - $q_size[3]) { }
112 3 1 $q_size[0] == 0 ? :
4 0 $q_size[1] == 0 ? :
2 2 $q_size[2] == 0 ? :
0 4 $q_size[3] == 0 ? :
126 1 4 if $self->limit < 1
134 1 32 if $self->limit < 1
143 2 40 if $self->limit < 1
145 20 20 if $self->start == 0
148 20 0 $page < $self->last_page ? :
154 1 4 if $self->limit < 1
156 1 3 $self->page > 1 ? :
162 1 4 if $self->limit < 1
164 4 0 $self->page < $self->last_page ? :
172 1 4 if $self->limit < 1 or $self->total == 0
180 1 4 if $self->limit < 1
182 0 4 $self->page == $self->last_page ? :
195 0 0 if $self->limit < 1
204 1 4 if $self->limit < 1
210 3 1 if (not defined $ranges->[0]) { }
211 0 3 if $self->page > 1
215 0 1 if defined $ranges->[1] and $ranges->[1][0] - $ranges->[0][1] > 1
220 0 4 if defined $ranges->[1]
222 2 2 if defined $ranges->[2]
224 0 4 if (not defined $ranges->[3]) { }
225 0 0 if $self->page < $self->last_page
228 2 2 if defined $ranges->[2] and $ranges->[3][0] - $ranges->[2][1] > 1