Condition Coverage

blib/lib/DBIx/Class/ResultSource.pm
Criterion Covered Total %
condition 188 278 67.6


and 2 conditions

line l !l condition
3036 1382 5 defined $srcregs->{$_} and $srcregs->{$_} == $_[0] and $srcregs->{$_} = $_[0] and last

and 3 conditions

line !l l&&!r l&&r condition
193 12155 0 89212 length ref $ancestor and my $ancestor_slot = $$rsrc_registry{my $ancestor_addr = &refaddr($ancestor)}
250 129 98095 3514 defined $_[2] and (length ref $_[2] xor length ref $_[0]{$_[1]}) || length ref $_[2] || $_[2] ne $_[0]{$_[1]}
316 44 0 2 $cs =~ /^ \Qat $fr[1] line $fr[2]\E (?: $ | \n )/x and $fr[3] =~ s/.+:://
342 120178 787311 4 not $_[0]{'__in_rsrc_setter_callstack'} and $_[0]{'__metadata_divergencies'}{$_[1]}
369 2 0 331031 defined $val and length $val
2 1 331030 defined $val and length $val and not defined &blessed($val)
1 309266 21764 defined $val and length $val and not defined &blessed($val) and not ${"${val}::__LOADED__BY__DBIC__CAG__COMPONENT_CLASS__";}
397 0 4 4 @fr = caller ++$fr_num and $fr[3] ne 'DBIx::Class::ResultSource::get_rsrc_instance_specific_attribute'
407 0 4 8 @fr = caller ++$fr_num and $fr[2] == 0 || $fr[3] eq '(eval)' || $fr[1] =~ /^\(eval \d+\)$/ || $fr[3] =~ /::(?: __ANON__ | _\w+ )$/x || $fr[0] =~ /^DBIx::Class::ResultSource/
423 0 0 4 @fr && $fr[3] =~ s/.+:://
447 0 2 2 $by && $_[0]{'__encountered_divergencies'}{$by}++
487 37894 0 51318 @_ == 1 && ref $_[0] eq 'HASH'
1171 0 258 258 not @constraints % 2 and grep {ref $_ ne 'ARRAY';} @constraints
1359 0 0 0 $class and $class->can('sqlt_deploy_hook')
1860 8887 0 7 $other_rel eq $rel and $self == $other_rsrc
1909 0 5732 3155 $roundtripped_rsrc = &dbic_internal_try(sub { $other_rsrc->related_source($other_rel); } ) and $our_registered_source_name && ($our_registered_source_name eq $roundtripped_rsrc->source_name || '') || $our_result_class eq $roundtripped_rsrc->result_class
5732 0 3155 $roundtripped_rsrc = &dbic_internal_try(sub { $other_rsrc->related_source($other_rel); } ) and $our_registered_source_name && ($our_registered_source_name eq $roundtripped_rsrc->source_name || '') || $our_result_class eq $roundtripped_rsrc->result_class and my $their_resolved_relcond = &dbic_internal_try(sub { $other_rsrc->resolve_relationship_condition('rel_name', $other_rel, ('foreign_alias', "!!!\377()!!!_DUMMY_FOREIGN_ALIAS_SHOULD_NEVER_BE_SEEN_IN_USE_!!!()\377!!!", 'self_alias', "!!!\376()!!!_DUMMY_SELF_ALIAS_SHOULD_NEVER_BE_SEEN_IN_USE_!!!()\376!!!")); } )
1926 558 0 2597 $their_resolved_relcond->{'identity_map_matches_condition'} and keys %{$$our_resolved_relcond{'identity_map'};} == keys %{$$their_resolved_relcond{'identity_map'};}
558 556 2041 $their_resolved_relcond->{'identity_map_matches_condition'} and keys %{$$our_resolved_relcond{'identity_map'};} == keys %{$$their_resolved_relcond{'identity_map'};} and &serialize($our_resolved_relcond->{'identity_map'}) eq &serialize({reverse(%{$their_resolved_relcond->{'identity_map'};})})
1947 0 0 901 $set and @$set
1950 227 3 886 $colinfos->{$_} and not $colinfos->{$_}{'is_nullable'}
1989 1376 38 2822 $cols->{'missing'} && exists $cols->{'missing'}{$col}
2822 1410 4 not $cols->{'missing'} && exists $cols->{'missing'}{$col} and keys %{{} unless $args->{'columns_info'}{$col}{'_filter_info'};}
2004 1265 0 2 $cols->{'undefined'} and not $ENV{'DBIC_NULLABLE_KEY_NOWARN'}
2034 325 92 2025 defined $join && length $join
2056 271 0 6 $seen->{$rel} && $seen->{$rel} + 1
2074 1152 0 59 $count > 1 && $count
2148 0 0 202 exists $keyhash->{$p} and not defined $$rel_data{$keyhash->{$p}}
0 0 202 exists $keyhash->{$p} and not defined $$rel_data{$keyhash->{$p}} and not +($colinfos ||= $rel_source->columns_info)->{$keyhash->{$p}}{'is_auto_increment'}
2214 0 0 0 $_ == 0 and $res_args[0]->isa($__expected_result_class_isa)
2262 0 0 0 $rc->{'join_free_condition'} and ref $res[0] eq 'HASH'
2365 0 10021 77 $rel_info and exists $rel_info->{'_original_name'}
2368 6508 3590 0 exists $args->{'self_result_object'} and exists $args->{'foreign_values'}
2379 0 0 3590 defined &blessed($args->{'self_result_object'}) && $args->{'self_result_object'}->isa($__expected_result_class_isa)
6508 3590 0 exists $args->{'self_result_object'} and not defined &blessed($args->{'self_result_object'}) && $args->{'self_result_object'}->isa($__expected_result_class_isa)
2386 9401 0 688 exists $args->{'foreign_values'} and ref $args->{'foreign_values'} eq 'HASH' || $self->throw_exception(q[Argument 'foreign_values' must be a hash reference])
0 9 679 exists $args->{'foreign_values'} and ref $args->{'foreign_values'} eq 'HASH' || $self->throw_exception(q[Argument 'foreign_values' must be a hash reference]) and keys %{$$args{'foreign_values'};}
2450 2322 2 3 length ref $args->{'foreign_values'}{$_} && ($rel_idx->{$_} || &is_literal_value($args->{'foreign_values'}{$_}) || (!exists +($equivalencies ||= extract_equality_conditions($args->{'foreign_values'}, 'consider nulls'))->{$_} || ($equivalencies->{$_} || '') eq \'1 = 0') && $self->throw_exception("Resolution of relationship '$args->{'rel_name'}' failed: " . "supplied value for foreign column '${_}' is not a direct " . 'equivalence expression'))
2529 102 0 0 defined &blessed($_) and $_->isa($__expected_result_class_isa)
102 0 0 defined &blessed($_) and $_->isa($__expected_result_class_isa) and $self->throw_exception("The join-free condition returned for $exception_rel_id may not " . 'contain result objects as values - perhaps instead of invoking ' . '->$something you meant to return ->get_column($something)')
2622 20 20 0 $ret and ($ret->{'join_free_condition'} xor $subcond->{'join_free_condition'})
2626 14 66 0 $subcond->{$_} and push @{$$ret{$_};}, $subcond->{$_}
2645 5992 0 14172 defined $ret->{$_} and $ret->{$_} ne \'1 = 0'
5992 14172 0 defined $ret->{$_} and $ret->{$_} ne \'1 = 0' and $ret->{$_} = normalize_sqla_condition($ret->{$_})
2648 7272 2806 4 $args->{'require_join_free_condition'} and not defined $ret->{'join_free_condition'}
2664 5988 3988 102 $ret->{'join_free_condition'} and not $ret->{'join_free_values'}
2687 11 0 92 exists $jfc_eqs->{$_} and ($jfc_eqs->{$_} || '') ne \'1 = 0'
2708 9376 700 2 $args->{'require_join_free_values'} and @nonvalues
2762 425 0 856 ref $col_eqs->{$lhs} eq 'HASH' && keys %{$$col_eqs{$lhs};} == 1 && exists $col_eqs->{$lhs}{'-ident'}
100 0 2 $col_eqs->{$lhs} =~ /^ ( \Q$args->{'self_alias'}\E \. .+ ) /x and +($colinfos->{$1} || {})->{'-result_source'} == $rel_rsrc
2773 213 0 966 $$colinfos{$rhs_ref->[0]} and $colinfos->{$lhs}{'-source_alias'} ne $$colinfos{$rhs_ref->[0]}{'-source_alias'}
2823 0 9983 93 ref $ret->{'condition'} eq 'HASH' and grep {$_ =~ /^-/;} keys %{$$ret{'condition'};}
3036 0 1382 5 defined $srcregs->{$_} and $srcregs->{$_} == $_[0]
1382 0 5 defined $srcregs->{$_} and $srcregs->{$_} == $_[0] and $srcregs->{$_} = $_[0]

or 2 conditions

line l !l condition
204 24231986 170878 0 defined $r->{$_}{'weakref'} or delete $r->{$_}
220 100915 452 $self->{'resultset_class'} ||= 'DBIx::Class::ResultSet'
221 101367 0 $self->{'name'} ||= '!!NAME NOT SET!!'
222 0 101367 $self->{'_columns_info_loaded'} ||= 0
223 100915 452 $self->{'sqlt_deploy_callback'} ||= 'default_sqlt_deploy_hook'
454 2 2 $_[0]->__construct_stale_metadata_diag($_[1]) || (return 0)
1009 0 0 $self->source_name || $self->result_class || $self->name || 'Unknown source...?'
1024 0 0 $self->source_name || $self->result_class || $self->name || 'Unknown source...?'
1599 60 32 $_[0]{'source_name'} || '_unnamed_'
1973 1405 10 $vals->{$col} || ''
2052 146 59 $rel_info->{'attrs'}{'join_type'} || ''
2104 280 931 $seen->{'-relation_chain_depth'} || 0
2225 0 0 $res_args[$_] ||= {}
2687 89 3 $jfc_eqs->{$_} || ''
2762 2 0 $colinfos->{$1} || {}

or 3 conditions

line l !l&&r !l&&!r condition
250 101279 329 1 (length ref $_[2] xor length ref $_[0]{$_[1]}) || length ref $_[2] || $_[2] ne $_[0]{$_[1]}
12594 3514 98224 defined $_[2] xor defined $_[0]{$_[1]} or defined $_[2] and (length ref $_[2] xor length ref $_[0]{$_[1]}) || length ref $_[2] || $_[2] ne $_[0]{$_[1]}
305 15 9 0 $callsite ||= do { my($cs) = DBIx::Class::Carp::__find_caller('DBIx::Class::ResultSource'); my($fr_num, @fr) = 1; while (@fr = caller $fr_num++) { last if $cs =~ /^ \Qat $fr[1] line $fr[2]\E (?: $ | \n )/x and $fr[3] =~ s/.+:://; } ; @fr ? "@{[&refdesc($_[0])];}->$fr[3](...) $cs" : "$cs" }
407 2 6 4 $fr[2] == 0 || $fr[3] eq '(eval)' || $fr[1] =~ /^\(eval \d+\)$/ || $fr[3] =~ /::(?: __ANON__ | _\w+ )$/x || $fr[0] =~ /^DBIx::Class::ResultSource/
1909 3149 6 5732 $our_registered_source_name && ($our_registered_source_name eq $roundtripped_rsrc->source_name || '') || $our_result_class eq $roundtripped_rsrc->result_class
1942 55 91 0 $cols || ()
1964 2995 236 0 $args->{'columns_info'} ||= $self->columns_info
1973 2821 1 1414 not exists $vals->{$col} or ($vals->{$col} || '') eq \'1 = 0'
2052 72 146 59 $force_left ||= lc($rel_info->{'attrs'}{'join_type'} || '') eq 'left'
2104 297 386 528 !$rel_info->{'attrs'}{'accessor'} || $rel_info->{'attrs'}{'accessor'} eq 'single' || $rel_info->{'attrs'}{'accessor'} eq 'filter'
2148 0 202 0 $colinfos ||= $rel_source->columns_info
2258 0 0 0 $rc->{'join_free_condition'} || $rc->{'condition'}
2349 0 0 30294 not defined $args->{$_} or length ref $args->{$_}
2356 10087 11 0 $self->source_name || $self->result_class
2370 2114 698 7286 $args->{'require_join_free_condition'} ||= !!$args->{'require_join_free_values'}
2386 688 0 0 ref $args->{'foreign_values'} eq 'HASH' || $self->throw_exception(q[Argument 'foreign_values' must be a hash reference])
2450 2327 0 2 not $_ =~ /^-/ or $self->throw_exception("The key '${_}' supplied as part of 'foreign_values' during " . 'relationship resolution must be a column name, not a function')
2517 102 0 0 exists $fq_col_list->{$_} or $self->throw_exception("The join-free condition returned for $exception_rel_id may only " . 'contain keys that are fully qualified column names of the corresponding source ' . "'${joinfree_alias}' (instead it returned '${_}')")
2716 2 0 0 &dbic_internal_try(sub { $self->schema->storage->sql_maker; } ) || require DBIx::Class::SQLMaker && 'DBIx::Class::SQLMaker'->new
2738 0 451 823 $ret->{'condition'} eq \'1 = 0' or keys %{$$ret{'condition'};} != keys %$col_eqs
2757 100 1181 0 $colinfos ||= fromspec_columns_info([{'-alias', $args->{'self_alias'}, '-rsrc', $self}, {'-alias', $args->{'foreign_alias'}, '-rsrc', $rel_rsrc}])
2813 37767 1167 0 defined $ret->{$_} or delete $ret->{$_}
2823 0 93 9983 $ret->{'condition'} eq \'1 = 0' or ref $ret->{'condition'} eq 'HASH' and grep {$_ =~ /^-/;} keys %{$$ret{'condition'};}
2996 0 0 67862 $global_phase_destroy ||= &in_global_destruction()
3013 48866 18950 46 not ref $_[0]{'schema'} or &isweak($_[0]{'schema'})

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
250 101609 12543 51 129 defined $_[2] xor defined $_[0]{$_[1]}
2622 13 0 0 7 $ret->{'join_free_condition'} xor $subcond->{'join_free_condition'}