Branch Coverage

blib/lib/DBIx/Class/ResultDDL.pm
Criterion Covered Total %
branch 100 154 64.9


line true false branch
16 0 47 if $^H == $DBIx::Class::ResultDDL::_default_h
17 47 0 if $^W == $DBIx::Class::ResultDDL::_default_w
23 35 24 unless ($pkg->can("load_components") and $pkg->can("add_column"))
33 6 41 if $DISABLE_AUTOCLEAN
36 41 0 unless $sref
46 8 0 if ($sym =~ /^-V([0-9]+)$/)
66 8 0 if ($name =~ /^V([0-9]+)$/)
69 0 8 unless eval "require $v_pkg"
76 360 82 if ($class->can($_) == $v_pkg->can($_)) { }
100 7 3 unless $pkg->isa("DBIx::Class::InflateColumn::DateTime")
109 2 0 unless $pkg->isa("DBIx::Class::InflateColumn::Serializer")
152 0 133 if scalar @_ & 1
165 0 5 @$array ? :
170 11 8 if @_ and &Scalar::Util::looks_like_number($_[0])
174 32 0 if @_ and &Scalar::Util::looks_like_number($_[0]) || uc $_[0] eq 'MAX'
180 8 9 if @_ and not ref $_[0] and $_[0] =~ /(^floating$|^local$|[A-Z])/
188 0 17 @_ > 1 ? :
192 0 22 if @_ and &Scalar::Util::looks_like_number($_[0])
205 4 1 if (defined $precision)
207 3 1 defined $scale ? :
209 4 1 $size ? :
217 1 1 defined $size ? :
226 0 1 defined $size ? :
227 1 1 defined $size ? :
234 0 0 defined $size ? :
239 0 12 defined $size ? :
252 5 15 $tz ? :
253 0 0 $tz ? :
258 2 0 if (@_ == 1 and $_[0] and not ref $_[0])
264 2 4 if $_[$i] eq "data_type"
266 0 2 unless $data_type_idx and $_[$data_type_idx] and not ref $_[$data_type_idx]
280 2 8 $defaults ? :
285 0 1 $defaults ? :
290 2 1 unless $pkg->isa("DBIx::Class::InflateColumn::Serializer")
328 3 9 if ($reltype eq 'rel_one' or $reltype eq 'rel_many') { }
333 3 0 if (ref $dbic_colmap eq "HASH")
335 3 0 unless defined $dbic_colmap->{$_}
346 1 2 $reltype eq 'rel_one' ? :
3 0 $is_f_key ? :
366 4 0 if not defined $mode or $mode eq 1
367 0 4 if $mode eq 0
375 4 0 defined $_[0] ? :
391 0 2 if $opts{'depends'}
409 0 0 if $stash->{'sqlt_deploy_hook'} and $stash->{'sqlt_deploy_hook'}{'CODE'}
415 0 2 unless eval "sub " . $pkg . "::sqlt_deploy_hook {\n\t\t\tmy \$self= shift;\n\t\t\t\$self->maybe::next::method(\@_);\n\t\t\tfor (\@methods) {\n\t\t\t\tmy (\$m, \@args)= \@\$_;\n\t\t\t\t\$_[0]->\$m(\@args);\n\t\t\t}\n\t\t} 1"
440 0 3 ref $_[0] ? :
442 0 0 defined $name ? :
0 3 unless ref $fields eq "ARRAY"
447 3 0 defined $name ? :
1 2 keys %options ? :
1 2 defined $type ? :
465 329 9 unless index($k, ".") >= 0
477 1 16 if $opts->{'default_value'} and not defined $opts->{'retrieve_on_insert'} and _settings_for_package($pkg)->{'retrieve_defaults'}
483 2 0 !ref($maybe_colmap) ? :
2 2 !ref($maybe_colmap) && $maybe_colmap =~ /JOIN / ? :
12 4 ref $maybe_colmap eq 'HASH' ? :
494 2 14 if index($rel_class, "::") >= 0
508 1 11 if ($key =~ /([^.]+)\.(.*)/)
509 0 1 if ($1 eq 'self') { }
511 0 0 if $direction < 0
515 0 1 if $direction > 0
516 1 0 if ($1 ne "foreign")
518 0 1 if $rel_class ne $1
522 11 1 if ($val =~ /([^.]+)\.(.*)/)
523 0 11 if ($1 eq 'self') { }
525 0 0 if $direction > 0
529 0 11 if $direction < 0
530 11 0 if ($1 ne "foreign")
532 0 11 if $rel_class ne $1
537 0 12 if $inconsistent
539 0 12 unless $rel_class and $direction
549 11 1 $direction > 0 ? :
11 1 $direction > 0 ? :
556 0 2 unless my($join_type, $rsrc, $alias, $on, $tpl) = $sql =~ /^\s*(LEFT\s*|INNER\s*)?JOIN\s+(\S+)\s+(\w+)\s+(ON\s+)?(.*)/is
560 1 1 $alias =~ /^ON\s*$/i ? :
564 0 2 unless my $tpl_fn = eval "sub { \\\"" . $tpl . "\" }"
565 2 0 $join_type ? :