blib/lib/DBI.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 192 | 354 | 54.2 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
592 | 106 | 6865 | 0 | $attr and not ref $attr |
608 | 0 | 6971 | 0 | $attr and not ref $attr |
6963 | 4 | 4 | ref $pass and not defined &Scalar::Util::blessed($pass) | |
625 | 6739 | 0 | 228 | $ENV{'DBI_AUTOPROXY'} and $driver ne 'Proxy' |
6739 | 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' | |
663 | 1604 | 0 | 5359 | defined $user and defined $pass |
687 | 38 | 0 | 0 | $attr->{'HandleError'} and $attr->{'HandleError'}->($msg, $drh, $dbh) |
706 | 0 | 0 | 28 | @{"${rebless_class}::db::ISA";} and @{"${rebless_class}::st::ISA";} |
775 | 0 | 0 | 246 | $driver and @_ <= 3 |
826 | 0 | 0 | 234 | $drh and ref $drh |
0 | 0 | 234 | $drh and ref $drh and not $@ | |
913 | 0 | 0 | 0 | $DbTypeSubclass and $DbTypeSubclass ne '1' |
0 | 0 | 0 | $DbTypeSubclass and $DbTypeSubclass ne '1' and ref $DbTypeSubclass ne 'CODE' | |
982 | 4 | 0 | 0 | $missing_ok and $@ =~ /^Can't locate \Q$module.pm\E/ |
1039 | 0 | 0 | 0 | $DBI::PurePerl and grep {-d "$_/auto/DBD/$driver";} @INC |
1092 | 4 | 0 | 8 | $rows++ and $lsep |
1105 | 24 | 0 | 4 | $logical and not $diff |
1109 | 8 | 4 | 12 | not $diff and $a_desc eq $b_desc |
1123 | 8 | 8 | 44 | defined $a and defined $b |
1139 | 28 | 4 | 72 | @a_chars and @b_chars |
1261 | 235 | 0 | 3 | $ENV{'DBI_PROFILE'} and not $DBI::PurePerl |
1325 | 0 | 0 | 4 | $drh and $inner |
1408 | 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 | |
1420 | 72 | 0 | 8 | @unknown and ref $h ? $h->FETCH('Warn') : 1 |
1495 | 32 | 0 | 3114 | $dbh and $dbh->FETCH('Active') |
32 | 0 | 3114 | $dbh and $dbh->FETCH('Active') and eval { do { $dbh->ping } } | |
1497 | 3112 | 0 | 2 | $cb and $cb = $cb->{'connect_cached.reused'} |
1505 | 30 | 0 | 2 | $cb and my $new_cb = $cb->{'connect_cached.new'} |
1512 | 30 | 0 | 2 | $cb and my $conn_cb = $cb->{'connect_cached.connected'} |
1538 | 150 | 8 | 40 | ref $v and ref $v ne 'CODE' |
1563 | 114 | 0 | 0 | @id > 3 && ref $id[-1] |
1611 | 8 | 0 | 0 | defined $lp and defined $ls |
1621 | 0 | 0 | 4 | $lp and $lp eq $ls |
0 | 4 | 0 | $lp and $lp eq $ls and $lp eq q['] || $lp eq '"' | |
1669 | 4 | 110 | 8 | not $slice and $slice = $attr->{'Columns'} |
1701 | 0 | 0 | 0 | 0 < $max-- and $sth->fetch |
1766 | 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] | |
1797 | 0 | 0 | 10 | $temp and @$temp |
1806 | 0 | 28 | 0 | $dt_idx and $dt_idx != 1 |
1813 | 4 | 0 | 24 | defined $data_type and $data_type != &DBI::SQL_ALL_TYPES() |
1827 | 0 | 28 | 0 | @ti and @{$ti[0];} != $idx_fields |
1868 | 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' | |
1905 | 116 | 0 | 0 | $fields <= 0 and not $sth->{'Active'} |
1915 | 112 | 4 | 272 | @_ and $idx < $fields |
1931 | 4 | 40 | 4 | $tuple_sts and ref $tuple_sts ne 'ARRAY' |
1937 | 0 | 24 | 4 | defined $NUM_OF_PARAMS and @array_of_arrays != $NUM_OF_PARAMS |
1959 | 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 | |
1972 | 0 | 28 | 0 | defined $NUM_OF_PARAMS and $NUM_OF_PARAMS != $NUM_OF_PARAMS_given |
2013 | 0 | 0 | 56 | $rc >= 0 && $rc_total >= 0 |
2037 | 2342 | 12 | 4 | $max_rows and not $sth->FETCH('Active') |
2046 | 2298 | 8 | 16 | $slice and @$slice |
2048 | 4 | 12 | 40 | $max_rows-- and $row = $sth->fetch |
2052 | 4 | 4 | 8 | $max_rows-- and $row = $sth->fetch |
2062 | 16 | 4 | 12 | $mode eq 'REF' and ref $$slice eq 'HASH' |
2093 | 0 | 0 | 0 | $max_rows-- and $sth->fetch |
2109 | 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 |
line | l | !l | condition |
---|---|---|---|
274 | 96 | 0 | $PurePerl ||= 0 |
532 | 0 | 192 | $@ || '' |
0 | 192 | $! || '' | |
554 | 0 | 0 | $ENV{'DBI_DRIVER'} || '' |
600 | 0 | 0 | $ENV{'DBI_DSN'} || $ENV{'DBI_DBNAME'} || '' |
615 | 14 | 6953 | $2 || '' |
770 | 0 | 0 | $ENV{'DBI_DRIVER'} || '' |
816 | 6 | 0 | ${"${driver_class}::VERSION";} || 'undef' |
825 | 0 | 234 | $attr || {} |
874 | 56 | 0 | $topclass || 'DBI' |
1047 | 0 | 0 | $vers || '?' |
1086 | 4 | 0 | $maxlen ||= 35 |
1087 | 4 | 0 | $lsep ||= "\n" |
1088 | 4 | 0 | $fh ||= \*STDOUT |
1111 | 4 | 4 | $diff ||= 'Strings contain the same sequence of characters' |
1176 | 40 | 32 | $a || '' |
1191 | 0 | 0 | $attr->{'dbi_loops'} || 5 |
1192 | 0 | 0 | $attr->{'dbi_par'} || 1 |
1193 | 0 | 0 | $attr->{'dbi_verb'} || 1 |
1194 | 0 | 0 | $attr->{'dbi_meth'} || 'connect' |
1284 | 0 | 3854 | $attr->{'Err'} ||= \my $err |
1285 | 0 | 3854 | $attr->{'Errstr'} ||= \my $errstr |
1286 | 0 | 3854 | $attr->{'State'} ||= \my $state |
1486 | 3126 | 20 | $drh->{'CachedKids'} ||= {} |
1566 | 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] | |
1605 | 2 | 6 | $dbh->{'dbi_literal_quote_cache'} ||= [{}, {}] |
1613 | 4 | 4 | $ti->{'LITERAL_PREFIX'} || '' |
1614 | 4 | 4 | $ti->{'LITERAL_SUFFIX'} || '' |
1715 | 16 | 32 | $dbh->{'CachedKids'} ||= {} |
1723 | 8 | 4 | $if_active ||= 0 |
1878 | 76 | 0 | $sth->{'ParamArrays'} ||= {} |
1904 | 116 | 0 | $sth->FETCH('NUM_OF_FIELDS') || 0 |
1915 | 272 | 0 | $sth->bind_col(++$idx, shift(), $attr) or return |
1941 | 72 | 4 | $sth->bind_param_array($_, $array_of_arrays[$_ - 1]) or return |
2025 | 20 | 12 | $tuples ||= '0E0' |
2039 | 56 | 2298 | ref $slice || 'ARRAY' |
2102 | 96 | 0 | $sth->{'FetchHashKeyName'} || 'NAME' |
2120 | 16 | 252 | $$ref{$row[$_]} ||= {} |
2132 | 0 | 0 | $blocksize ||= 512 |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
273 | 0 | 96 | 0 | $@ or $ENV{'DBI_PUREPERL'} >= 2 |
554 | 2 | 0 | 0 | $driver ||= $ENV{'DBI_DRIVER'} || '' |
598 | 3146 | 3825 | 0 | $connect_meth ||= $DBI::connect_via |
600 | 6971 | 0 | 0 | $dsn ||= $ENV{'DBI_DSN'} || $ENV{'DBI_DBNAME'} || '' |
608 | 0 | 0 | 6971 | ref $old_driver or $attr and not ref $attr |
0 | 10 | 6961 | ref $old_driver or $attr and not ref $attr or ref $pass and not defined &Scalar::Util::blessed($pass) | |
619 | 6967 | 0 | 0 | $old_driver || $1 || $ENV{'DBI_DRIVER'} |
656 | 6753 | 214 | 0 | $DBI::installed_drh{$driver} || $class->install_driver($driver) |
699 | 24 | 8 | 6873 | $apply->{'RootClass'} || ($class ne 'DBI' ? $class : '') |
722 | 0 | 0 | 0 | $rebless_class || $class |
770 | 246 | 0 | 0 | $driver ||= $ENV{'DBI_DRIVER'} || '' |
828 | 0 | 0 | 0 | $@ ||= "$driver_class->driver didn't return a handle" |
854 | 96 | 750 | 756 | UNIVERSAL::isa("${h_class}_mem", $mem_class) or $DBI::PurePerl |
930 | 0 | 0 | 0 | $driver eq 'ODBC' or $driver eq 'ADO' |
1124 | 8 | 0 | 8 | defined $a or defined $b |
1191 | 0 | 0 | 0 | my $loops ||= $attr->{'dbi_loops'} || 5 |
1192 | 0 | 0 | 0 | my $par ||= $attr->{'dbi_par'} || 1 |
1193 | 0 | 0 | 0 | my $verb ||= $attr->{'dbi_verb'} || 1 |
1194 | 0 | 0 | 0 | my $meth ||= $attr->{'dbi_meth'} || 'connect' |
1208 | 0 | 0 | 0 | $drh->connect($dsn, $dbuser, $dbpass) || Carp::croak("connect failed: $DBI::errstr\n") |
1261 | 3 | 0 | 235 | $ENV{'DBI_PROFILE'} and not $DBI::PurePerl or $shared_profile |
1616 | 4 | 0 | 4 | $lp or $ls |
1621 | 4 | 0 | 0 | $lp eq q['] || $lp eq '"' |
1805 | 28 | 0 | 0 | $idx_hash->{'DATA_TYPE'} || $idx_hash->{'data_type'} |
1912 | 12 | 0 | 104 | not defined $_[0] or ref $_[0] eq 'HASH' |
1918 | 4 | 4 | 108 | @_ or $idx != $fields |
1982 | 36 | 0 | 12 | not $maxlen or @$ary > $maxlen |