Branch Coverage

blib/lib/Mojolicious/Plugin/Pager.pm
Criterion Covered Total %
branch 45 50 90.0


line true false branch
14 146 19 @args && ref $args[-1] eq 'CODE' ? :
17 18 147 if $page->{'current'}
18 7 158 if $page->{'first'}
19 11 154 if $page->{'last'}
20 15 150 if $page->{'next'}
21 15 150 if $page->{'prev'}
22 104 61 unless @classes
23 15 150 if $page->{'next'}
24 15 150 if $page->{'prev'}
32 18 4 @_ ? :
0 22 ref $_[0] ? :
43 7 15 if ($current_page < $window_size) { }
7 8 elsif ($current_page + $pager_size - $window_size > $total_pages) { }
53 2 20 if $start_page < 1
55 8 144 if @pages >= $pager_size
57 10 134 if $n == 1
58 14 130 if $n == $total_pages
59 21 123 if $n == $current_page
62 0 0 $c->stash('pages_as_array_ref') ? :
0 22 unless @pages
63 1 4 $c->stash('pages_as_array_ref') ? :
5 17 if $total_pages <= $pager_size and not $c->stash('pager.show_prev_next')
66 15 2 if $current_page > 1
67 15 2 if $current_page < $total_pages
69 0 17 $c->stash('pages_as_array_ref') ? :