Sanify search_related chaining code (no functional changes)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Pager.pm
CommitLineData
75d07914 1package # hide from PAUSE
2 DBIx::Class::CDBICompat::Pager;
65c2b042 3
75d07914 4use strict;
5use warnings FATAL => 'all';
65c2b042 6
75d07914 7*pager = \&page;
65c2b042 8
75d07914 9sub page {
10 my $class = shift;
65c2b042 11
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}
65c2b042 18
75d07914 191;