Remove Class::Data::Inheritable and use CAG 'inherited' style accessors
[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;
9f7d5590 5
6# even though fatalization has been proven over and over to be a universally
7# bad idea, this line has been part of the code from the beginning
8# leaving the compat layer as-is, something may in fact depend on that
75d07914 9use warnings FATAL => 'all';
65c2b042 10
5e0eea35 11use base 'DBIx::Class';
12
75d07914 13*pager = \&page;
65c2b042 14
75d07914 15sub page {
16 my $class = shift;
65c2b042 17
75d07914 18 my $rs = $class->search(@_);
8fbed205 19 unless ($rs->{attrs}{page}) {
75d07914 20 $rs = $rs->page(1);
21 }
22 return ( $rs->pager, $rs );
23}
65c2b042 24
75d07914 251;