Helper/ResultSet/Shortcut/LimitedPage.pm

filter: Statementstmt 95.2% 20 / 21 Branchbran 83.3% 5 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 90.6% 29 / 32 CC 4 SCAR 10.1
CC
4
Cov
93%
limited_page
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« Helper/ResultSet/Util.pm ↑ Summary Helper/ResultSet/RemoveColumns.pm »
1 package DBIx::Class::Helper::ResultSet::Shortcut::LimitedPage;
2 57 $DBIx::Class::Helper::ResultSet::Shortcut::LimitedPage::VERSION = '2.037000';
3 57 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 57 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 57 ▶use parent qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
7 DBIx::Class::Helper::ResultSet::Shortcut::Rows
8 DBIx::Class::Helper::ResultSet::Shortcut::Page
9 DBIx::Class::ResultSet
10 57 );
11  
12 5 ▶sub limited_page {
Subroutine limited_page: called CC=4 SCAR=13.9
Pod undocumented
13 5 my $self = shift;
14 5 ▶ if (@_ == 1) {
Branch: 2 branches
BranchTrueFalseTotal
if (@_ == 1) { } 4 1 5
elsif (@_ == 2) { } 1 0 1
15 4 my $arg = shift;
16 4 ▶ if (ref $arg) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $arg) { } 3 1 4
17 3 my ( $page, $rows ) = @$arg{qw(page rows)};
18 3 return $self->page($page)->rows($rows);
19 } else {
20 1 return $self->page($arg);
21 }
22 } elsif (@_ == 2) {
23 1 my ( $page, $rows ) = @_;
24 1 return $self->page($page)->rows($rows);
25 } else {
26 0 die 'Invalid args passed to get_page method';
27 }
28 }
29  
30 57 1;
31  
32 __END__
« Helper/ResultSet/Util.pm ↑ Summary Helper/ResultSet/RemoveColumns.pm »