Condition Coverage

blib/lib/DBIx/Class/Storage/DBI.pm
Criterion Covered Total %
condition 123 236 52.1


and 2 conditions

line l !l condition
1001 0 57 $_[0]->_populate_dbh and 1
2751 0 0 ++$$seen_lcs{lc $_} and $columns->{$_} = {'idx', scalar keys %$columns, 'name', $_, 'lc_name', lc $_}

and 3 conditions

line !l l&&!r l&&r condition
299 657 69198 24 defined $pid and $pid != $$
69855 0 24 defined $pid and $pid != $$ and my $dbh = $_[0]->_dbh
660 0 8 460 keys %attrs and ref $args[0] ne 'CODE'
713 641 6 168 not defined $conninfo->[0] and $ENV{'DBI_DSN'}
985 136 20 9676 $_[0]->_dbh and $_[0]->_dbh->FETCH('Active')
1016 0 0 95 $_[0]->ensure_connected && $_[0]->_dbh
1368 411 35 7 not $started_connected and defined $self->_dbh
1379 37 0 3 ref $self->_dbi_connect_info->[0] and &reftype($self->_dbi_connect_info->[0]) eq 'CODE'
1551 672 0 0 $INC{'Apache/DBI.pm'} and $ENV{'MOD_PERL'}
1601 490 2 0 $dbh->{'HandleError'} and ref $dbh->{'HandleError'} ne '__DBIC__DBH__ERROR__HANDLER__'
1676 610 0 8621 not $self->transaction_depth and defined $self->_dbh_autocommit
610 8621 0 not $self->transaction_depth and defined $self->_dbh_autocommit and not $self->_dbh_autocommit
1708 2 0 137 not $self->transaction_depth and defined $self->_dbh_autocommit
2 137 0 not $self->transaction_depth and defined $self->_dbh_autocommit and not $self->_dbh_autocommit
1752 0 10737 7930 not $ENV{'DBIC_DT_SEARCH_OK'} and $op eq 'select'
10737 7930 0 not $ENV{'DBIC_DT_SEARCH_OK'} and $op eq 'select' and grep {$_->[1]->isa('DateTime') if defined &blessed($_->[1]);} @$bind
1825 0 4 140 $_ && $_->[1]
1949 19971 2 226 length ref $bind->[$i][1] && &is_plain_value($bind->[$i][1])
1971 7686 0 0 $colinfo->{$col}{'auto_nextval'} and !exists $to_insert->{$col} || &is_literal_value($to_insert->{$col})
2433 103855 0 50 length ref $v && ($vref = &is_plain_value($v))
2454 2 7711 0 not defined $err and !defined($rv) || $sth->err
2470 0 2 3 $i <= $#$tuple_status and not ref $tuple_status->[$i]
2533 789 0 1 $_[3]{'software_limit'} and $_[3]{'offset'} || $_[3]{'rows'}
2580 7843 81 11 $attrs->{'_grouped_by_distinct'} and $attrs->{'collapse'}
7520 357 47 $prefetch_needs_subquery || !$attrs->{'_simple_passthrough_construction'} and $attrs->{'group_by'}
357 0 47 $prefetch_needs_subquery || !$attrs->{'_simple_passthrough_construction'} and $attrs->{'group_by'} and @{$attrs->{'group_by'};}
357 0 47 $prefetch_needs_subquery || !$attrs->{'_simple_passthrough_construction'} and $attrs->{'group_by'} and @{$attrs->{'group_by'};} and my $grp_aliases = &dbic_internal_try(sub { $self->_resolve_aliastypes_from_select_args({'from', $attrs->{'from'}, 'group_by', $attrs->{'group_by'}}); } )
6128 1749 0 $attrs->{'rows'} and $attrs->{'collapse'}
2624 86 0 7848 not $prefetch_needs_subquery and ref $attrs->{'from'}
86 3 7845 not $prefetch_needs_subquery and ref $attrs->{'from'} and &reftype($attrs->{'from'}) eq 'ARRAY'
3 6970 875 not $prefetch_needs_subquery and ref $attrs->{'from'} and &reftype($attrs->{'from'}) eq 'ARRAY' and @{$attrs->{'from'};} != 1
2756 0 0 0 $$seen_lcs{$_->{'lc_name'}} == 1 and $_->{'name'} = $_->{'lc_name'}
2797 0 0 0 $inf->{'size'} || !1 and $inf->{'data_type'} =~ qr/^text$/i
3047 0 0 0 -e $filename and $version eq $schema_version
3335 1423 196 74 $join_count && $join_count > 1

or 2 conditions

line l !l condition
710 815 0 $self->{'_dbi_connect_info'} || []
997 6 0 $_[0]->_dbh || (return 0)
1400 37 0 $self->_dbi_connect_info->[0] || ''
1780 34527 6528 $colinfos ||= {%{fromspec_columns_info($ident);}}
1860 41778 391 $_[0]->_dbh_details->{'_datatype_map_cache'} ||= {}
1900 0 0 $sth->errstr || $sth->err || 'Unknown error: execute() returned false, but error flags were not set...'
2454 0 0 $sth->errstr || 'UNKNOWN ERROR ($sth->errstr is unset)'
2790 0 0 +($dbh->type_info($inf->{'data_type'}) || (next) || (next))->{'TYPE_NAME'} || (next)
2797 0 0 $inf->{'size'} || !1
3020 0 0 $databases ||= ['MySQL', 'SQLite', 'PostgreSQL']
3023 0 0 $schema->schema_version || '1.x'

or 3 conditions

line l !l&&r !l&&!r condition
223 34 232 0 defined $seek_and_destroy{$_} or delete $seek_and_destroy{$_}
667 459 0 1 $attrs{'AutoCommit'} or $ENV{'DBIC_UNSAFE_AUTOCOMMIT_OK'}
866 821 2283 45638 $self->{'_in_do_block'} or $self->transaction_depth
921 4 22 19 $self->on_disconnect_call || ()
1116 491 0 3 $_[0]->on_connect_call || ()
1305 74 3 454 $self->_driver_determined || $self->{'_in_determine_driver'}
1328 221 218 0 ${"${storage_class}::__INITIAL_MRO_UPON_DBIC_LOAD__";} ||= &mro::get_mro($storage_class)
1401 29 4 4 $drv ||= $ENV{'DBI_DRIVER'}
1666 9231 0 0 $self->transaction_depth or $self->_dbh->FETCH('AutoCommit')
1698 140 0 0 $self->transaction_depth or $self->_dbh->FETCH('AutoCommit')
1746 10737 7934 0 $from || $ident
1787 0 40941 0 $ret->{'sqlt_datatype'} ||= $colinfos->{$col}{'data_type'}
1790 0 10546 0 $ret->{'sqlt_size'} ||= $colinfos->{$col}{'size'}
1809 197 2 43561 ref $_ ne 'ARRAY' || @$_ != 2
0 2277 22125 !keys(%{$$_[0];}) || exists $_->[0]{'dbd_attrs'} || $_->[0]{'sqlt_datatype'}
1930 0 0 0 $dbh->errstr || sprintf(q[$dbh->prepare() of '%s' through %s failed *silently* without an exception and/or setting $dbh->errstr], length $sql > 20 ? substr($sql, 0, 20) . '...' : $sql, 'DBD::' . $dbh->{'Driver'}{'Name'})
1943 0 0 0 $bind->[$i][0]{'dbd_size'} || $self->_max_column_bytesize($bind->[$i][0])
1971 0 0 0 !exists $to_insert->{$col} || &is_literal_value($to_insert->{$col})
1983 0 0 0 $colinfo->{$col}{'sequence'} ||= $self->_dbh_get_autoinc_seq($self->_get_dbh, $source, $col)
2454 0 0 7711 !defined($rv) || $sth->err
2477 2 0 0 $tuple_status->[$i][1] || $err
2533 0 1 0 $_[3]{'offset'} || $_[3]{'rows'}
2573 167 12 0 $attrs->{'rows'} ||= $sql_maker->__max_int
2580 0 404 7520 $prefetch_needs_subquery || !$attrs->{'_simple_passthrough_construction'}
2619 1716 0 6126 $attrs->{'rows'} || ()
133 1583 6126 $attrs->{'offset'} || ()
3024 0 0 0 $version ||= $schema_version
3264 0 0 1 $self->{'datetime_parser'} ||= do { $self->build_datetime_parser(@_) }
3380 0 0 0 $max_size or $self->_is_lob_type($data_type)
3385 0 0 0 $max_size or $self->_dbic_connect_attributes->{'LongReadLen'}
0 0 0 $max_size or $self->_dbic_connect_attributes->{'LongReadLen'} or $self->_get_dbh->{'LongReadLen'}
3391 0 0 0 $data_type =~ /lob|bfile|text|image|bytea|memo/i or $data_type =~ /^long(?:\s+(?:raw|bit\s*varying|varbit|binary |varchar|character\s*varying|nvarchar |national\s*character\s*varying))?\z/xi
3399 0 0 0 $data_type =~ /blob|bfile|image|bytea/i or $data_type =~ /^long(?:\s+(?:raw|bit\s*varying|varbit|binary))?\z/xi
3405 0 0 0 $data_type =~ /^(?:clob|memo)\z/i or $data_type =~ /^long(?:\s+(?:varchar|character\s*varying|nvarchar |national\s*character\s*varying))\z/xi
3413 0 0 0 $self->_is_binary_lob_type($data_type) or $data_type =~ /(?:var)?(?:binary|bit|graphic)(?:\s*varying)?/i