Commit | Line | Data |
---|---|---|
cd122820 | 1 | package # hide from pause |
2 | DBIx::Class::ResultSet::Pager; | |
3 | ||
4 | use warnings; | |
5 | use strict; | |
6 | ||
7 | use base 'Data::Page'; | |
8 | use mro 'c3'; | |
9 | ||
10 | # simple support for lazy totals | |
11 | sub _total_entries_accessor { | |
12 | if (@_ == 1 and ref $_[0]->{total_entries} eq 'CODE') { | |
13 | return $_[0]->{total_entries} = $_[0]->{total_entries}->(); | |
14 | } | |
15 | ||
16 | return shift->next::method(@_); | |
17 | } | |
18 | ||
19 | sub _skip_namespace_frames { qr/^Data::Page/ } | |
20 | ||
21 | 1; |