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