Condition Coverage

blib/lib/DBIx/QueryLog.pm
Criterion Covered Total %
condition 96 156 61.5


and 3 conditions

line !l l&&!r l&&r condition
124 15 0 0 $probability and int((rand()) * $probability) % $probability != 0
145 9 0 6 $container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'} and @params
184 12 0 0 $probability and int((rand()) * $probability) % $probability != 0
195 11 0 1 $container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'} and @bind
225 0 0 332 $dbh->{'Driver'}{'Name'} ne 'mysql' and $dbh->{'Driver'}{'Name'} ne 'Pg'
0 8 324 $dbh->{'Driver'}{'Name'} eq 'SQLite' && 1 && !@bind
0 324 8 $dbh->{'Driver'}{'Name'} ne 'mysql' and $dbh->{'Driver'}{'Name'} ne 'Pg' and not $dbh->{'Driver'}{'Name'} eq 'SQLite' && 1 && !@bind
230 124 20 180 $probability and int((rand()) * $probability) % $probability != 0
241 144 0 0 $container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'} and @bind
295 4 10 0 defined $args{'print'} and $args{'print'}
315 0 0 0 $pos >= 6 && substr($ret, $pos - 6, 6) =~ /\A[Ll](?:IMIT|imit) \z/
322 0 0 0 defined $type and $dbh->{'Driver'}{'Name'} eq 'Pg'
0 0 0 defined $type and $dbh->{'Driver'}{'Name'} eq 'Pg' and $type == 0
370 46 238 0 not $quote_char and $s eq ' ' || $s eq "\n" || $s eq "\t" || $s eq "\r"
1 133 33 not $before_escape and $quote_char
134 32 1 not $before_escape and $quote_char and $s eq '\\'
377 1 4 7 not $before_escape and $s eq $quote_char
391 127 0 4 $s eq ')' || $s eq ',' and substr($buff, -1, 1) eq ' '

or 2 conditions

line l !l condition
164 1 5 $sth->{'private_DBIx_QueryLog_params'} ||= []
165 1 5 $sth->{'private_DBIx_QueryLog_attrs'} ||= []
166 0 6 $attr || 0
257 2 14 $types ||= []
307 23 155 $types ||= []
346 167 0 $bind_params ||= []

or 3 conditions

line l !l&&r !l&&!r condition
47 2 22 0 $st_execute ||= $class->_st_execute(sub ; )
48 2 22 0 $st_bind_param ||= $class->_st_bind_param(sub ; )
49 2 22 0 $db_do ||= $class->_db_do(sub ; )
51 2 22 0 $selectall_arrayref ||= $class->_select_array(sub ; )
52 2 22 0 $selectrow_arrayref ||= $class->_select_array(sub ; )
53 2 22 0 $selectrow_array ||= $class->_select_array(sub ; , 1)
123 0 0 15 $container->{'probability'} || $ENV{'DBIX_QUERYLOG_PROBABILITY'}
141 1 0 14 $container->{'explain'} or $ENV{'DBIX_QUERYLOG_EXPLAIN'}
145 4 0 11 $container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'}
183 0 0 12 $container->{'probability'} || $ENV{'DBIX_QUERYLOG_PROBABILITY'}
191 3 0 9 $container->{'explain'} or $ENV{'DBIX_QUERYLOG_EXPLAIN'}
195 1 0 11 $container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'}
229 100 0 224 $container->{'probability'} || $ENV{'DBIX_QUERYLOG_PROBABILITY'}
237 4 0 140 $container->{'explain'} or $ENV{'DBIX_QUERYLOG_EXPLAIN'}
241 0 0 144 $container->{'skip_bind'} || $ENV{'DBIX_QUERYLOG_SKIP_BIND'}
278 0 0 14 $dbh->{'Driver'}{'Name'} eq 'mysql' or $dbh->{'Driver'}{'Name'} eq 'Pg'
309 0 0 178 $dbh->{'Driver'}{'Name'} eq 'mysql' or $dbh->{'Driver'}{'Name'} eq 'Pg'
313 0 0 0 $limit_flag ||= do { my $pos = pos $ret; $pos >= 6 && substr($ret, $pos - 6, 6) =~ /\A[Ll](?:IMIT|imit) \z/ ? 1 : 0 }
343 1 0 168 $container->{'threshold'} || $ENV{'DBIX_QUERYLOG_THRESHOLD'}
344 167 0 2 not $threshold or $time > $threshold
351 8 0 175 $SKIP_PKG_MAP{$c[0]} or $c[0] =~ /^DB[DI]::/
358 5 0 162 $container->{'skip_bind'} or $ENV{'DBIX_QUERYLOG_SKIP_BIND'}
363 2 0 165 $container->{'compact'} or $ENV{'DBIX_QUERYLOG_COMPACT'}
370 10 1 141 $s eq ' ' || $s eq "\n" || $s eq "\t" || $s eq "\r"
16 4 167 $s eq q['] or $s eq '"'
20 0 167 $s eq q['] or $s eq '"' or $s eq '`'
391 2 2 127 $s eq ')' || $s eq ','
406 2 0 165 $container->{'useqq'} or $ENV{'DBIX_QUERYLOG_USEQQ'}
413 1 0 166 $container->{'color'} || $ENV{'DBIX_QUERYLOG_COLOR'}
423 1 0 166 $container->{'show_data_source'} || $ENV{'DBIX_QUERYLOG_SHOW_DATASOURCE'}