Branch Coverage

blib/lib/DBIx/Wrapper.pm
Criterion Covered Total %
branch 0 620 0.0


line true false branch
220 0 0 unless my $pkg = ref $obj
237 0 0 unless length($t = ref $r)
241 0 0 eval { do { $r->a_sub_not_likely_to_be_here; 1 } } ? :
245 0 0 $q =~ /^\*/ ? :
247 0 0 unless ($t = eval { do { my $q = *$r; $q =~ /^\*/ ? 'GLOB' : 'IO' } })
255 0 0 length ref ${$r;} ? :
0 0 unless defined *glob{'ARRAY'} and 'ARRAY' or defined *glob{'HASH'} and 'HASH' or defined *glob{'CODE'} and 'CODE'
300 0 0 if ($e eq ':heavy')
398 0 0 if ref $data_source eq 'HASH'
401 0 0 unless (ref $attr eq 'HASH' and defined $$attr{'PrintError'} and CORE::not $$attr{'PrintError'})
405 0 0 unless ($dbh)
406 0 0 if ($self->_isDebugOn) { }
409 0 0 if CORE::not defined $$attr{'PrintError'} or $$attr{'PrintError'}
415 0 0 unless UNIVERSAL::isa($params, 'HASH')
425 0 0 if $$params{'error_handler'}
426 0 0 if $$params{'debug_handler'}
427 0 0 if exists $$params{'db_style'}
428 0 0 if $$params{'heavy'}
429 0 0 if exists $$params{'no_placeholders'}
511 0 0 unless ($config)
519 0 0 unless ($this_db)
528 0 0 if (ref $dsn eq 'HASH')
535 0 0 if ($attr_container and UNIVERSAL::isa($attr_container, 'HASH'))
546 0 0 unless ($self->_load_config_general)
562 0 0 unless ($config_obj)
571 0 0 if (defined $have_config_general)
577 0 0 if ($@) { }
601 0 0 if ($dbh) { }
620 0 0 if $dbi_obj
682 0 0 unless $cfg_list and @$cfg_list
698 0 0 unless $db
708 0 0 unless $cfg_list and @$cfg_list
710 0 0 unless CORE::not defined $$_{'weight'}
723 0 0 if ($target < $accumulated)
730 0 0 wantarray ? :
738 0 0 if $$data_source{'database'}
739 0 0 if $$data_source{'host'}
740 0 0 if $$data_source{'port'}
742 0 0 if $$data_source{'mysql_connect_timeout'}
747 0 0 if ($$data_source{'timeout'})
748 0 0 if ($driver eq 'mysql')
782 0 0 unless $dbh
819 0 0 if (UNIVERSAL::isa($value, 'DBIx::Wrapper::SQLCommand')) { }
0 0 elsif (ref $value eq 'SCALAR') { }
824 0 0 if ($self->_getNoPlaceholders) { }
825 0 0 if (defined $value) { }
844 0 0 unless $sth
869 0 0 if (UNIVERSAL::isa($value, 'DBIx::Wrapper::SQLCommand')) { }
0 0 elsif (ref $value eq 'SCALAR') { }
874 0 0 if ($self->_getNoPlaceholders) { }
875 0 0 if (defined $value) { }
889 0 0 if (@fields) { }
891 0 0 unless (scalar @fields == scalar @these_fields)
906 0 0 unless $sth
938 0 0 if ($style eq 'mssql') { }
972 0 0 unless $sth
978 0 0 if lc $$info{'key'} eq 'pri'
979 0 0 if ($$info{'extra'} =~ /auto_increment/i)
990 0 0 if exists $$key_hash{lc $key}
991 0 0 if (lc $key eq $auto_incr)
997 0 0 if (@$keys_provided) { }
1000 0 0 unless $rv
1001 0 0 if (CORE::not defined $orig_auto_incr or $orig_auto_incr eq '') { }
1004 0 0 if $row and %$row
1012 0 0 unless $rv
1013 0 0 if (CORE::not defined $orig_auto_incr or $orig_auto_incr eq '') { }
1046 0 0 unless ($keys and UNIVERSAL::isa($keys, 'HASH') || UNIVERSAL::isa($keys, 'ARRAY'))
1052 0 0 if (ref $keys eq 'ARRAY') { }
1073 0 0 if ($self->_getNoPlaceholders) { }
1074 0 0 if (defined $val) { }
1082 0 0 if (defined $val) { }
1098 0 0 unless $sth
1107 0 0 unless ($quote_cache)
1132 0 0 if ($ref and $ref eq 'SCALAR') { }
1167 0 0 if (ref $table eq 'ARRAY') { }
1197 0 0 if (defined $keys)
1198 0 0 unless (UNIVERSAL::isa($keys, 'HASH') or UNIVERSAL::isa($keys, 'ARRAY'))
1204 0 0 unless ($data and UNIVERSAL::isa($data, 'HASH'))
1208 0 0 unless (%$data)
1220 0 0 if (UNIVERSAL::isa($value, 'DBIx::Wrapper::SQLCommand')) { }
0 0 elsif (ref $value eq 'SCALAR') { }
1225 0 0 if ($self->_getNoPlaceholders) { }
1226 0 0 if (defined $value) { }
1241 0 0 if (ref $keys eq 'ARRAY') { }
0 0 elsif (CORE::not defined $keys) { }
1266 0 0 if (defined $keys)
1267 0 0 if ($self->_getNoPlaceholders) { }
1271 0 0 if (UNIVERSAL::isa($val, 'DBIx::Wrapper::SQLCommand')) { }
1274 0 0 if ($val->has_condition)
1277 0 0 if (defined $r_val) { }
1297 0 0 if (defined $val) { }
1298 0 0 if (UNIVERSAL::isa($val, 'DBIx::Wrapper::SQLCommand')) { }
1299 0 0 if ($val->has_condition)
1301 0 0 if (defined $r_val) { }
1330 0 0 if (defined $where) { }
1338 0 0 unless $sth
1348 0 0 if (defined $value) { }
1350 0 0 if ($dont_quote_val) { }
1382 0 0 if ($row and %$row)
1438 0 0 unless $sth
1441 0 0 if ($info and %$info) { }
1444 0 0 wantarray ? :
1458 0 0 if ($exec_args) { }
1471 0 0 if (ref $cols eq 'ARRAY') { }
0 0 elsif (defined $cols and $cols ne '') { }
1472 0 0 if (@$cols)
1480 0 0 if ($keys and ref $keys eq 'HASH' && %$keys || ref $keys eq 'ARRAY' && @$keys) { }
1496 0 0 if (ref $data eq 'HASH') { }
0 0 elsif (ref $data eq 'ARRAY') { }
1500 0 0 if (ref $val) { }
1503 0 0 if $exec_args
1506 0 0 if ($self->_getNoPlaceholders) { }
1507 0 0 if (defined $val) { }
1515 0 0 if (defined $val) { }
1526 0 0 wantarray ? :
1529 0 0 if (ref $val) { }
1533 0 0 if $exec_args
1536 0 0 if ($self->_getNoPlaceholders) { }
1537 0 0 if (defined $val) { }
1545 0 0 if (defined $val) { }
1556 0 0 wantarray ? :
1558 0 0 wantarray ? :
1576 0 0 unless $sth
1628 0 0 unless $sth
1633 0 0 if ($info and @$info) { }
1636 0 0 wantarray ? :
1658 0 0 unless $sth
1683 0 0 unless (ref $data eq 'HASH' and %$data)
1689 0 0 if ($self->exists($table, $keys)) { }
1695 0 0 unless exists $new_data{$key}
1706 0 0 unless ref $handler_info
1709 0 0 unless $custom_args
1712 0 0 if (ref $handler eq 'ARRAY') { }
1724 0 0 unless $handlers
1729 0 0 unless $custom_args
1731 0 0 if (ref $handler eq 'ARRAY') { }
1737 0 0 unless $rv == $r->DECLINED
1779 0 0 if ($self->shouldBeHeavy)
1780 0 0 if ($custom_handler_field eq '_post_fetch_hooks')
1786 0 0 if $custom_handlers
1796 0 0 if $custom_handlers
1806 0 0 if $custom_handlers
1816 0 0 if $custom_handlers
1844 0 0 if (ref $row eq 'HASH') { }
0 0 elsif (ref $row eq 'ARRAY') { }
1866 0 0 if (defined $1 and $1 eq '::') { }
1867 0 0 defined $2 ? :
0 0 defined $3 ? :
0 0 defined $2 ? :
1871 0 0 if ($self->_getNoPlaceholders) { }
1880 0 0 wantarray ? :
1887 0 0 if (scalar @_ >= 3)
1889 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
1901 0 0 unless $exec_args
1916 0 0 if (ref $attr eq 'HASH') { }
1924 0 0 $sth ? :
1927 0 0 unless ($sth)
1928 0 0 if ($self->_isDebugOn) { }
1933 0 0 wantarray ? :
1947 0 0 $rv ? :
1952 0 0 unless ($rv)
1953 0 0 if ($self->_isDebugOn) { }
1958 0 0 wantarray ? :
1962 0 0 wantarray ? :
1995 0 0 if (scalar @_ == 3) { }
2001 0 0 unless $sth
2081 0 0 if (scalar @_ == 3) { }
2087 0 0 unless $sth
2101 0 0 unless $result and ref($result) =~ /ARRAY/
2129 0 0 if (scalar @_ == 3) { }
2134 0 0 unless $sth
2181 0 0 if ($rows) { }
2182 0 0 if (scalar @$rows == 0) { }
0 0 elsif (scalar @$rows == 1) { }
2232 0 0 if (scalar @_ >= 3) { }
2238 0 0 unless $sth
2278 0 0 if (scalar @_ == 3) { }
2319 0 0 if ($first =~ /^\d/) { }
2321 0 0 if (scalar @_ == 4) { }
2328 0 0 unless (defined $key)
2336 0 0 if (scalar @_ == 4) { }
2343 0 0 unless (defined $key)
2371 0 0 if (scalar @_ == 3) { }
2399 0 0 if ($col =~ /^\d/) { }
2401 0 0 if (scalar @_ == 4) { }
2414 0 0 if (scalar @_ == 4) { }
2453 0 0 if (scalar @_ == 3) { }
2458 0 0 if ($row and @$row)
2487 0 0 if (scalar @_ == 3) { }
2493 0 0 unless $rows
2516 0 0 if (@bind) { }
2541 0 0 if (@bind) { }
2595 0 0 if (scalar @_ == 3) { }
2623 0 0 if (scalar @_ >= 3) { }
2628 0 0 unless $sth
2774 0 0 if ($self->_get_i_val('_debug') and $self->_get_i_val('_debug_fh') or $ENV{'DBIX_WRAPPER_DEBUG'})
2785 0 0 unless $handler
2786 0 0 if ($handler)
2787 0 0 if (UNIVERSAL::isa($handler, 'ARRAY')) { }
2802 0 0 unless $$dbi_obj{'PrintError'}
2804 0 0 unless $self->getDebugLevel | 2
2807 0 0 unless $fh
2825 0 0 if $frame >= 10
2831 0 0 if defined $extra
2835 0 0 unless defined $subroutine
2836 0 0 if $subroutine ne ''
2860 0 0 if $frame >= 10
2865 0 0 unless defined $subroutine
2866 0 0 if $subroutine ne ''
2873 0 0 unless ($self->_isDebugOn)
2879 0 0 unless $fh
2882 0 0 unless $handler
2883 0 0 if ($handler)
2884 0 0 if (UNIVERSAL::isa($handler, 'ARRAY')) { }
2912 0 0 unless defined $value
2933 0 0 unless $self->_getDisconnect
2935 0 0 if $dbh
2945 0 0 unless defined $arg and $arg ne ''
3001 0 0 if $dbh
3017 0 0 $dbh ? :
3162 0 0 if $Heavy or $self->_getHeavy
3332 0 0 if ($dbh)
3350 0 0 if ($dbh)
3368 0 0 if ($dbh)
3386 0 0 unless $dbh
3430 0 0 if (defined $db_style and $db_style ne '') { }
0 0 elsif (defined $dbd_driver and $dbd_driver ne '') { }
3439 0 0 if ($row and @$row)
3455 0 0 if ($db_style eq 'mssql' or $db_style eq 'sybase' or $db_style eq 'asa' or $db_style eq 'asany') { }
0 0 elsif ($db_style eq 'mysql') { }
0 0 elsif ($db_style eq 'sqlite') { }
3474 0 0 if (defined $var) { }
3487 0 0 unless defined $unix_ts
3491 0 0 unless $year > 1000
3501 0 0 unless defined $unix_ts
3505 0 0 unless $year > 1000
3651 0 0 unless defined $sep
3652 0 0 unless defined $quote
3659 0 0 if (index($col, $sep) >= 0 or index($col, $quote) >= 0)
3720 0 0 if (reftype $rows eq 'ARRAY') { }
0 0 elsif (reftype $rows eq 'HASH') { }
3721 0 0 unless @$rows
3725 0 0 if (reftype $first_row eq 'HASH') { }
0 0 elsif (reftype $first_row eq 'ARRAY') { }
3728 0 0 unless ($no_header)
3744 0 0 unless ($no_header)
3767 0 0 if $indent
3769 0 0 if $indent
3801 0 0 unless (defined $record_tag_name)
3805 0 0 if (reftype $rows eq 'ARRAY') { }
0 0 elsif (reftype $rows eq 'HASH') { }
3806 0 0 unless @$rows
3811 0 0 if $indent
3814 0 0 if $indent
3829 0 0 unless defined $text
3858 0 0 unless (defined $to_encode)
3865 0 0 unless ($type)
3870 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($to_encode =~ /\A\d+\Z/) { }
3917 0 0 if ($$str_ref =~ /\A(\d+):/) { }
0 0 elsif ($$str_ref =~ s/\A(.)//) { }
3926 0 0 if ($letter eq 'n') { }
0 0 elsif ($letter eq 'i') { }
0 0 elsif ($letter eq 'l') { }
0 0 elsif ($letter eq 'd') { }
3972 0 0 unless defined $data
3975 0 0 unless (defined $type)
3979 0 0 if ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'HASH') { }
3997 0 0 unless defined $str
4052 0 0 if $pos >= $len
4062 0 0 if ($count > $len - $pos)
4071 0 0 if ($char =~ /\s/ or $char eq '') { }
0 0 elsif ($char eq '/') { }
4076 0 0 if ($char eq '/') { }
0 0 elsif ($char eq '*') { }
4084 0 0 unless (defined $char)
4089 0 0 if ($char eq '*') { }
4090 0 0 if (defined _parse_json_next_char() and $char eq '/')
4113 0 0 unless ($char eq '"' or $char eq q['])
4123 0 0 if ($char eq $boundary) { }
0 0 elsif ($char eq '\\') { }
4129 0 0 if (exists $$json_escape_map{$char}) { }
0 0 elsif ($char eq 'u') { }
4138 0 0 unless ($char =~ /[0-9A-Fa-f]/)
4140 0 0 if ($json_warn)
4165 0 0 unless $char eq '{'
4172 0 0 if ($char eq '}')
4181 0 0 unless ($char eq ':')
4190 0 0 if ($char eq '}') { }
0 0 elsif ($char eq ',') { }
4203 0 0 if $json_warn
4207 0 0 unless $char eq '['
4213 0 0 if ($char eq ']')
4221 0 0 if ($char eq ']') { }
0 0 elsif ($char eq ',') { }
4234 0 0 if $json_warn
4241 0 0 if ($char eq '0')
4251 0 0 $hex ? :
4269 0 0 if (exists $$json_bareword_map{$word})
4273 0 0 if $json_warn
4279 0 0 unless defined $char
4280 0 0 if $char eq '{'
4281 0 0 if $char eq '['
4282 0 0 if $char eq '"' or $char eq q[']
4283 0 0 if $char eq '-'
4284 0 0 $char =~ /\d/ ? :
4310 0 0 if (ref $self) { }