Condition Coverage

blib/lib/DBI.pm
Criterion Covered Total %
condition 192 354 54.2


and 3 conditions

line !l l&&!r l&&r condition
594 106 6867 0 $attr and not ref $attr
610 0 6973 0 $attr and not ref $attr
6965 4 4 ref $pass and not defined &Scalar::Util::blessed($pass)
627 6741 0 228 $ENV{'DBI_AUTOPROXY'} and $driver ne 'Proxy'
6741 34 194 $ENV{'DBI_AUTOPROXY'} and $driver ne 'Proxy' and $driver ne 'Sponge'
34 0 194 $ENV{'DBI_AUTOPROXY'} and $driver ne 'Proxy' and $driver ne 'Sponge' and $driver ne 'Switch'
665 1606 0 5359 defined $user and defined $pass
689 38 0 0 $attr->{'HandleError'} and $attr->{'HandleError'}->($msg, $drh, $dbh)
708 0 0 28 @{"${rebless_class}::db::ISA";} and @{"${rebless_class}::st::ISA";}
777 0 0 248 $driver and @_ <= 3
828 0 0 236 $drh and ref $drh
0 0 236 $drh and ref $drh and not $@
915 0 0 0 $DbTypeSubclass and $DbTypeSubclass ne '1'
0 0 0 $DbTypeSubclass and $DbTypeSubclass ne '1' and ref $DbTypeSubclass ne 'CODE'
984 4 0 0 $missing_ok and $@ =~ /^Can't locate \Q$module.pm\E/
1041 0 0 0 $DBI::PurePerl and grep {-d "$_/auto/DBD/$driver";} @INC
1094 4 0 12 $rows++ and $lsep
1107 24 0 4 $logical and not $diff
1111 8 4 12 not $diff and $a_desc eq $b_desc
1125 8 8 44 defined $a and defined $b
1141 28 4 72 @a_chars and @b_chars
1263 237 0 3 $ENV{'DBI_PROFILE'} and not $DBI::PurePerl
1327 0 0 4 $drh and $inner
1410 124 0 0 DBI::looks_like_number($word) and $word <= 15
124 0 0 DBI::looks_like_number($word) and $word <= 15 and $word >= 0
1422 72 0 8 @unknown and ref $h ? $h->FETCH('Warn') : 1
1497 32 0 3114 $dbh and $dbh->FETCH('Active')
32 0 3114 $dbh and $dbh->FETCH('Active') and eval { do { $dbh->ping } }
1499 3112 0 2 $cb and $cb = $cb->{'connect_cached.reused'}
1507 30 0 2 $cb and my $new_cb = $cb->{'connect_cached.new'}
1514 30 0 2 $cb and my $conn_cb = $cb->{'connect_cached.connected'}
1540 150 8 40 ref $v and ref $v ne 'CODE'
1565 114 0 0 @id > 3 && ref $id[-1]
1613 8 0 0 defined $lp and defined $ls
1623 0 0 4 $lp and $lp eq $ls
0 4 0 $lp and $lp eq $ls and $lp eq q['] || $lp eq '"'
1671 4 110 8 not $slice and $slice = $attr->{'Columns'}
1703 0 0 0 0 < $max-- and $sth->fetch
1768 24 4 4 defined $args[3] and $args[3] eq '%'
28 0 4 defined $args[3] and $args[3] eq '%' and grep {$_ eq '' if defined $_;} @args[0, 1, 2]
1799 0 0 10 $temp and @$temp
1808 0 28 0 $dt_idx and $dt_idx != 1
1815 4 0 24 defined $data_type and $data_type != &DBI::SQL_ALL_TYPES()
1829 0 28 0 @ti and @{$ti[0];} != $idx_fields
1870 4 36 44 defined $value_array and ref $value_array
40 40 4 defined $value_array and ref $value_array and ref $value_array ne 'ARRAY'
1907 116 0 0 $fields <= 0 and not $sth->{'Active'}
1917 112 4 272 @_ and $idx < $fields
1933 4 40 4 $tuple_sts and ref $tuple_sts ne 'ARRAY'
1939 0 24 4 defined $NUM_OF_PARAMS and @array_of_arrays != $NUM_OF_PARAMS
1961 0 0 4 defined $NUM_OF_FIELDS and defined $NUM_OF_PARAMS
0 4 0 defined $NUM_OF_FIELDS and defined $NUM_OF_PARAMS and $NUM_OF_FIELDS != $NUM_OF_PARAMS
1974 0 28 0 defined $NUM_OF_PARAMS and $NUM_OF_PARAMS != $NUM_OF_PARAMS_given
2015 0 0 56 $rc >= 0 && $rc_total >= 0
2039 2342 12 4 $max_rows and not $sth->FETCH('Active')
2048 2298 8 16 $slice and @$slice
2050 4 12 40 $max_rows-- and $row = $sth->fetch
2054 4 4 8 $max_rows-- and $row = $sth->fetch
2064 16 4 12 $mode eq 'REF' and ref $$slice eq 'HASH'
2095 0 0 0 $max_rows-- and $sth->fetch
2111 96 0 4 not defined $index and DBI::looks_like_number($_)
96 0 4 not defined $index and DBI::looks_like_number($_) and $_ >= 1
0 0 4 not defined $index and DBI::looks_like_number($_) and $_ >= 1 and $_ <= $num_of_fields

or 2 conditions

line l !l condition
274 97 0 $PurePerl ||= 0
534 0 194 $@ || ''
0 194 $! || ''
556 0 0 $ENV{'DBI_DRIVER'} || ''
602 0 0 $ENV{'DBI_DSN'} || $ENV{'DBI_DBNAME'} || ''
617 14 6955 $2 || ''
772 0 0 $ENV{'DBI_DRIVER'} || ''
818 6 0 ${"${driver_class}::VERSION";} || 'undef'
827 0 236 $attr || {}
876 56 0 $topclass || 'DBI'
1049 0 0 $vers || '?'
1088 4 0 $maxlen ||= 35
1089 4 0 $lsep ||= "\n"
1090 4 0 $fh ||= \*STDOUT
1113 4 4 $diff ||= 'Strings contain the same sequence of characters'
1178 40 32 $a || ''
1193 0 0 $attr->{'dbi_loops'} || 5
1194 0 0 $attr->{'dbi_par'} || 1
1195 0 0 $attr->{'dbi_verb'} || 1
1196 0 0 $attr->{'dbi_meth'} || 'connect'
1286 0 3856 $attr->{'Err'} ||= \my $err
1287 0 3856 $attr->{'Errstr'} ||= \my $errstr
1288 0 3856 $attr->{'State'} ||= \my $state
1488 3126 20 $drh->{'CachedKids'} ||= {}
1568 24 0 $dbh->get_info(29) || '"'
20 4 $dbh->get_info(41) || '.'
20 4 $dbh->get_info(114) || 1
90 24 $dbh->{'dbi_quote_identifier_cache'} ||= [$dbh->get_info(29) || '"', $dbh->get_info(41) || '.', $dbh->get_info(114) || 1]
1607 2 6 $dbh->{'dbi_literal_quote_cache'} ||= [{}, {}]
1615 4 4 $ti->{'LITERAL_PREFIX'} || ''
1616 4 4 $ti->{'LITERAL_SUFFIX'} || ''
1717 16 32 $dbh->{'CachedKids'} ||= {}
1725 8 4 $if_active ||= 0
1880 76 0 $sth->{'ParamArrays'} ||= {}
1906 116 0 $sth->FETCH('NUM_OF_FIELDS') || 0
1917 272 0 $sth->bind_col(++$idx, shift(), $attr) or return
1943 72 4 $sth->bind_param_array($_, $array_of_arrays[$_ - 1]) or return
2027 20 12 $tuples ||= '0E0'
2041 56 2298 ref $slice || 'ARRAY'
2104 96 0 $sth->{'FetchHashKeyName'} || 'NAME'
2122 16 252 $$ref{$row[$_]} ||= {}
2134 0 0 $blocksize ||= 512

or 3 conditions

line l !l&&r !l&&!r condition
273 0 97 0 $@ or $ENV{'DBI_PUREPERL'} >= 2
556 2 0 0 $driver ||= $ENV{'DBI_DRIVER'} || ''
600 3146 3827 0 $connect_meth ||= $DBI::connect_via
602 6973 0 0 $dsn ||= $ENV{'DBI_DSN'} || $ENV{'DBI_DBNAME'} || ''
610 0 0 6973 ref $old_driver or $attr and not ref $attr
0 10 6963 ref $old_driver or $attr and not ref $attr or ref $pass and not defined &Scalar::Util::blessed($pass)
621 6969 0 0 $old_driver || $1 || $ENV{'DBI_DRIVER'}
658 6753 216 0 $DBI::installed_drh{$driver} || $class->install_driver($driver)
701 24 8 6875 $apply->{'RootClass'} || ($class ne 'DBI' ? $class : '')
724 0 0 0 $rebless_class || $class
772 248 0 0 $driver ||= $ENV{'DBI_DRIVER'} || ''
830 0 0 0 $@ ||= "$driver_class->driver didn't return a handle"
856 96 759 765 UNIVERSAL::isa("${h_class}_mem", $mem_class) or $DBI::PurePerl
932 0 0 0 $driver eq 'ODBC' or $driver eq 'ADO'
1126 8 0 8 defined $a or defined $b
1193 0 0 0 my $loops ||= $attr->{'dbi_loops'} || 5
1194 0 0 0 my $par ||= $attr->{'dbi_par'} || 1
1195 0 0 0 my $verb ||= $attr->{'dbi_verb'} || 1
1196 0 0 0 my $meth ||= $attr->{'dbi_meth'} || 'connect'
1210 0 0 0 $drh->connect($dsn, $dbuser, $dbpass) || Carp::croak("connect failed: $DBI::errstr\n")
1263 3 0 237 $ENV{'DBI_PROFILE'} and not $DBI::PurePerl or $shared_profile
1618 4 0 4 $lp or $ls
1623 4 0 0 $lp eq q['] || $lp eq '"'
1807 28 0 0 $idx_hash->{'DATA_TYPE'} || $idx_hash->{'data_type'}
1914 12 0 104 not defined $_[0] or ref $_[0] eq 'HASH'
1920 4 4 108 @_ or $idx != $fields
1984 36 0 12 not $maxlen or @$ary > $maxlen