Browseable/_common.pm

filter: Statementstmt 97.9% 48 / 49 Branchbran 85.7% 12 / 14 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 2 totaltotal 91.0% 71 / 78 CC 12 SCAR 12.4
CC
12
Cov
94%
_tabInTab
5.0
__ANON__
4.1
__ANON__
4.0
CRAP 3.4
« Browseable/Store/MySQL.pm ↑ Summary Browseable/Store/DBI.pm »
1 package Apache::Session::Browseable::_common;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use AutoLoader 'AUTOLOAD';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 5 our $VERSION = '1.2.2';
7  
8 9 ▶sub _tabInTab {
Subroutine _tabInTab: called CC=5 SCAR=16.1
9 9 my ( $class, $t1, $t2 ) = @_;
10  
11 # if no fields are required, return 0
12 9 ▶ return 0 unless(@$t1 and @$t2);
Branch: 1 branch
BranchTrueFalseTotal
unless @$t1 and @$t2 3 6 9
Condition66%2/3
@$t1 and @$t2
!ll&&!rl&&r
306
MC/DC50%1/2
@$t1 and @$t2
@$t1 @$t2
Truth table66%2/3
A and B
A= @$t1B= @$t2
ABresult
0X0
100
111
13 6 foreach my $f (@$t1) {
14 15 ▶ unless ( grep { $_ eq $f } @$t2 ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (grep {$_ eq $f;} @$t2) 3 12 15
15 3 return 0;
16 }
17 }
18 3 return 1;
19 }
20  
21 8 ▶sub _fieldIsIndexed {
Subroutine _fieldIsIndexed: called CC=2 SCAR=7.0
22 8 my ( $class, $args, $field ) = @_;
23 my $index =
24 8 ▶ ref( $args->{Index} ) ? $args->{Index} : [ split /\s+/, $args->{Index} ];
Branch: 1 branch
BranchTrueFalseTotal
ref $args->{'Index'} ? : 0 8 8
25 8 return ( grep { $_ eq $field } @$index );
26 }
27  
28 5 1;
29 __END__
« Browseable/Store/MySQL.pm ↑ Summary Browseable/Store/DBI.pm »