Subject: | entries_on_this_page returns wrong value on non-existent pages |
For example, we have 5 entries with a page size of 10, the first page has 5 results, any other page has none.
Example code :
use Data::Page;
my $page = Data::Page->new();
$page->total_entries(5);
$page->entries_per_page(10);
$page->current_page(2);
print $page->entries_on_this_page;
The above returns 5, should return 0 or undef.
Example code :
use Data::Page;
my $page = Data::Page->new();
$page->total_entries(5);
$page->entries_per_page(10);
$page->current_page(2);
print $page->entries_on_this_page;
The above returns 5, should return 0 or undef.