File Coverage

blib/lib/Data/Paging/Renderer/NeighborLink.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 11 12 91.6


line stmt bran cond sub pod time code
1             package Data::Paging::Renderer::NeighborLink;
2 2     2   893 use common::sense;
  2         5  
  2         16  
3              
4 2     2   2379 use parent 'Data::Paging::Renderer::Base';
  2         704  
  2         12  
5              
6             sub render {
7 1     1 0 8 my ($self, $collection) = @_;
8              
9             return +{
10 1         6 entries => $collection->sliced_entries,
11             has_next => $collection->has_next,
12             has_prev => $collection->has_prev,
13             next_page => $collection->next_page,
14             current_page => $collection->current_page,
15             prev_page => $collection->prev_page,
16             begin_count => $collection->begin_count,
17             end_count => $collection->end_count,
18             base_url => $collection->base_url,
19             };
20             }
21              
22             1;