Commit | Line | Data |
---|---|---|
75d07914 | 1 | package # hide from PAUSE |
2 | DBIx::Class::CDBICompat::Pager; | |
2a21de92 | 3 | \r |
75d07914 | 4 | use strict; |
5 | use warnings FATAL => 'all'; | |
2a21de92 | 6 | \r |
75d07914 | 7 | *pager = \&page; |
2a21de92 | 8 | \r |
75d07914 | 9 | sub page { |
10 | my $class = shift; | |
2a21de92 | 11 | \r |
75d07914 | 12 | my $rs = $class->search(@_); |
8fbed205 | 13 | unless ($rs->{attrs}{page}) { |
75d07914 | 14 | $rs = $rs->page(1); |
15 | } | |
16 | return ( $rs->pager, $rs ); | |
17 | } | |
2a21de92 | 18 | \r |
75d07914 | 19 | 1; |