DBIx/Class/ResultSet/Pager.pm

filter: Statementstmt 94.1% 16 / 17 Branchbran 100% 2 / 2 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 83.3% 5 / 6 Podpod n/a totaltotal 93.3% 28 / 30 CC 3 SCAR 6.3
CC
3
Cov
95%
_total_entries_accessor
3.0
_skip_namespace_frames
2.0
BEGIN
1.0
CRAP 1.9
« DBIx/Class/ResultSource/View.pm ↑ Summary DBIx/Class/ResultSetProxy.pm »
1 package # hide from pause
2 DBIx::Class::ResultSet::Pager;
3  
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 ▶use base 'Data::Page';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 4 ▶use mro 'c3';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 # simple support for lazy totals
11 sub _total_entries_accessor {
12 81 ▶ if (@_ == 1 and ref $_[0]->{total_entries} eq 'CODE') {
Subroutine _total_entries_accessor: called CC=3 SCAR=11.0
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 1 and ref $_[0]{"total_entries"} eq "CODE") 10 71 81
Condition100%3/3
@_ == 1 and ref $_[0]{"total_entries"} eq "CODE"
!ll&&!rl&&r
185310
MC/DC100%2/2
@_ == 1 and ref $_[0]{"total_entries"} eq "CODE"
@_ == 1 ref $_[0]{"total_entries"} eq "CODE"
Truth table100%3/3
A and B
A= @_ == 1B= ref $_[0]{"total_entries"} eq "CODE"
ABresult
0X0
100
111
13 10 return $_[0]->{total_entries} = $_[0]->{total_entries}->();
14 }
15  
16 71 return shift->next::method(@_);
17 }
18  
19 0 ▶sub _skip_namespace_frames { qr/^Data::Page/ }
Subroutine _skip_namespace_frames: not called CC=1 SCAR=6.9
20  
21 4 1;
« DBIx/Class/ResultSource/View.pm ↑ Summary DBIx/Class/ResultSetProxy.pm »