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