File: Pager.pm

package info (click to toggle)
libdbix-class-perl 0.07003-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,396 kB
  • ctags: 764
  • sloc: perl: 7,046; sql: 217; makefile: 43
file content (19 lines) | stat: -rw-r--r-- 288 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package # hide from PAUSE
    DBIx::Class::CDBICompat::Pager;

use strict;
use warnings FATAL => 'all';

*pager = \&page;

sub page {
  my $class = shift;

  my $rs = $class->search(@_);
  unless ($rs->{attrs}{page}) {
    $rs = $rs->page(1);
  }
  return ( $rs->pager, $rs );
}

1;