blib/lib/Class/DBI/Plugin/Pager/RowsTo.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 14 | 14 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 18 | 19 | 94.7 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Class::DBI::Plugin::Pager::RowsTo; | ||||||
2 | 3 | 3 | 17 | use strict; | |||
3 | 22 | ||||||
3 | 118 | ||||||
3 | 3 | 3 | 19 | use warnings; | |||
3 | 4 | ||||||
3 | 99 | ||||||
4 | |||||||
5 | 3 | 3 | 16 | use base 'Class::DBI::Plugin::Pager'; | |||
3 | 6 | ||||||
3 | 607 | ||||||
6 | |||||||
7 | sub make_limit { | ||||||
8 | 9 | 9 | 0 | 18 | my ( $self ) = @_; | ||
9 | |||||||
10 | 9 | 59 | my $offset = $self->skipped; | ||||
11 | 9 | 692 | my $rows = $self->entries_per_page; | ||||
12 | |||||||
13 | 9 | 92 | my $last = $rows + $offset; | ||||
14 | |||||||
15 | 9 | 44 | return "ROWS $offset TO $last"; | ||||
16 | } | ||||||
17 | |||||||
18 | 1; | ||||||
19 |