Connector/Driver/SQLite.pm

filter: Statementstmt 48.0% 12 / 25 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 42.8% 3 / 7 Podpod 100% 3 / 3 totaltotal 36.0% 18 / 50 CC 6 SCAR 18.3
CC
6
Cov
32%
_connect
12.0
savepoint
6.0
release
6.0
CRAP 6.2
↑ Summary Connector.pm »
1 1 ▶use strict; use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package DBIx::Connector::Driver::SQLite;
4  
5 1 ▶use DBIx::Connector::Driver;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '0.60';
8 1 our @ISA = qw( DBIx::Connector::Driver );
9  
10 0 ▶sub _connect {
Subroutine _connect: not called CC=3 SCAR=24.8
11 0 my ($self, $dbh, $dsn, $username, $password, $attrs) = @_;
12  
13 0 my ( $maj, $min, $rel ) = split /[.]/, $dbh->{sqlite_version};
14 0 ▶ $self->{_sqlite_is_new_enough} = ( $maj <=> 3 || $min <=> 6 || $rel <=> 8 ) != -1;
Condition0%0/6
$maj <=> 3 || $min <=> 6 || $rel <=> 8
l!l&&r!l&&!r
000
$maj <=> 3 or $min <=> 6
l!l&&r!l&&!r
000
MC/DC0%0/3
$maj <=> 3 || $min <=> 6 || $rel <=> 8
$maj <=> 3 $min <=> 6 $rel <=> 8
Truth table0%0/4
A or B || C
A= $maj <=> 3B= $min <=> 6C= $rel <=> 8
ABCresult
1XX1
01X1
0011
0000
15 0 return $dbh;
16 }
17  
18 0 ▶sub savepoint {
Subroutine savepoint: not called CC=2 SCAR=17.9
Pod documented
19 0 my ($self, $dbh, $name) = @_;
20 0 ▶ return unless $self->{_sqlite_is_new_enough};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"_sqlite_is_new_enough"} 0 0 0
21 0 $dbh->do("SAVEPOINT $name");
22 }
23  
24 0 ▶sub release {
Subroutine release: not called CC=2 SCAR=17.9
Pod documented
25 0 my ($self, $dbh, $name) = @_;
26 0 ▶ return unless $self->{_sqlite_is_new_enough};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"_sqlite_is_new_enough"} 0 0 0
27 0 $dbh->do("RELEASE SAVEPOINT $name");
28 }
29  
30 0 ▶sub rollback_to {
Subroutine rollback_to: not called CC=2 SCAR=17.9
Pod documented
31 0 my ($self, $dbh, $name) = @_;
32 0 ▶ return unless $self->{_sqlite_is_new_enough};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"_sqlite_is_new_enough"} 0 0 0
33 0 $dbh->do("ROLLBACK TO SAVEPOINT $name");
34 }
35  
36 1 1;
37  
38 __END__
↑ Summary Connector.pm »