blib/lib/DBIO/Test/SQLTracerObj.pm

filter: Statementstmt 77.7% 28 / 36 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 66.6% 8 / 12 Podpod 100% 6 / 6 totaltotal 75.4% 43 / 57 CC 2 SCAR 3.0
CC
2
Cov
76%
query_start
2.0
svp_begin
2.0
svp_release
2.0
CRAP 1.3
« blib/lib/DBIO/InflateColumn/Serializer/YAML.pm ↑ Summary blib/lib/DBIO/Test/MooSchema/Result/CD.pm »
1 package # moar hide
2 DBIO::Test::SQLTracerObj;
3 # ABSTRACT: SQL statement tracing object for test diagnostics
4  
5 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 our $VERSION = '0.900007';
9  
10 6 ▶use base 'DBIO::Storage::Statistics';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 6 ▶use Sub::Util 'set_subname';
Subroutine BEGIN: called CC=1 SCAR=0.0
12 6 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 8 ▶sub query_start { push @{$_[0]{sqlbinds}}, [ ($_[1] =~ /^\s*(\S+)/)[0], [ $_[1], @{ $_[2]||[] } ] ] }
Subroutine query_start: called CC=2 SCAR=7.1
Pod documented
Condition50%1/2
$_[2] || []
l!l
80
MC/DC0%0/1
$_[2] || []
$_[2]
Truth table50%1/2
A
A= $_[2]
Aresult
11
00
15  
16 # who the hell came up with this API >:(
17 6 for my $txn (qw(begin rollback commit)) {
18 6 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
19 0 ▶ *{"txn_$txn"} = set_subname "txn_$txn" => sub { push @{$_[0]{sqlbinds}}, [ uc $txn => [ uc $txn ] ] };
Subroutine txn_begin: not called CC=1 SCAR=0.4
Subroutine txn_rollback: called CC=1 SCAR=0.4
Pod documented
Pod documented
20 }
21  
22 0 ▶sub svp_begin { push @{$_[0]{sqlbinds}}, [ SAVEPOINT => [ "SAVEPOINT $_[1]" ] ] }
Subroutine svp_begin: not called CC=1 SCAR=6.9
Pod documented
23 0 ▶sub svp_release { push @{$_[0]{sqlbinds}}, [ RELEASE_SAVEPOINT => [ "RELEASE $_[1]" ] ] }
Subroutine svp_release: not called CC=1 SCAR=6.9
Pod documented
24 0 ▶sub svp_rollback { push @{$_[0]{sqlbinds}}, [ ROLLBACK_TO_SAVEPOINT => [ "ROLLBACK TO $_[1]" ] ] }
Subroutine svp_rollback: not called CC=1 SCAR=6.9
Pod documented
25  
26 6 1;
27  
28 __END__
« blib/lib/DBIO/InflateColumn/Serializer/YAML.pm ↑ Summary blib/lib/DBIO/Test/MooSchema/Result/CD.pm »