File Coverage

blib/lib/DBIx/Class/CDBICompat/Pager.pm
Criterion Covered Total %
statement 9 15 60.0
branch 0 2 0.0
condition n/a
subroutine 3 5 60.0
pod 0 2 0.0
total 12 24 50.0


line stmt bran cond sub pod time code
1             package # hide from PAUSE
2             DBIx::Class::CDBICompat::Pager;
3              
4 2     2   726 use strict;
  2         4  
  2         57  
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
9 2     2   9 use warnings FATAL => 'all';
  2         5  
  2         65  
10              
11 2     2   10 use base 'DBIx::Class';
  2         4  
  2         282  
12              
13 0     0 0   sub pager { shift->page(@_) }
14              
15             sub page {
16 0     0 0   my $class = shift;
17              
18 0           my $rs = $class->search(@_);
19 0 0         unless ($rs->{attrs}{page}) {
20 0           $rs = $rs->page(1);
21             }
22 0           return ( $rs->pager, $rs );
23             }
24              
25             1;