blib/lib/Class/DBI/Plugin/Pager/LimitOffset.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 13 | 69.2 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 4 | 75.0 |
pod | 0 | 1 | 0.0 |
total | 12 | 18 | 66.6 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Class::DBI::Plugin::Pager::LimitOffset; | ||||||
2 | 1 | 1 | 776 | use strict; | |||
1 | 2 | ||||||
1 | 35 | ||||||
3 | 1 | 1 | 5 | use warnings; | |||
1 | 1 | ||||||
1 | 45 | ||||||
4 | |||||||
5 | 1 | 1 | 6 | use base 'Class::DBI::Plugin::Pager'; | |||
1 | 1 | ||||||
1 | 540 | ||||||
6 | |||||||
7 | sub make_limit { | ||||||
8 | 0 | 0 | 0 | my ( $self ) = @_; | |||
9 | |||||||
10 | 0 | my $offset = $self->skipped; | |||||
11 | 0 | my $rows = $self->entries_per_page; | |||||
12 | |||||||
13 | 0 | "LIMIT $rows OFFSET $offset"; | |||||
14 | } | ||||||
15 | |||||||
16 | 1; | ||||||
17 |