blib/lib/Class/DBI/Plugin/Pager/LimitXY.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 13 | 13 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 17 | 18 | 94.4 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Class::DBI::Plugin::Pager::LimitXY; | ||||||
2 | 2 | 2 | 136370 | use strict; | |||
2 | 5 | ||||||
2 | 80 | ||||||
3 | 2 | 2 | 11 | use warnings; | |||
2 | 5 | ||||||
2 | 58 | ||||||
4 | |||||||
5 | 2 | 2 | 11 | use base 'Class::DBI::Plugin::Pager'; | |||
2 | 4 | ||||||
2 | 857 | ||||||
6 | |||||||
7 | sub make_limit { | ||||||
8 | 4 | 4 | 0 | 8 | my ( $self ) = @_; | ||
9 | |||||||
10 | 4 | 27 | my $offset = $self->skipped; | ||||
11 | 4 | 526 | my $rows = $self->entries_per_page; | ||||
12 | |||||||
13 | 4 | 101 | return "LIMIT $offset, $rows"; | ||||
14 | } | ||||||
15 | |||||||
16 | 1; |