Branch Coverage

blib/lib/DBIx/Class/ResultDDL/SchemaLoaderMixin.pm
Criterion Covered Total %
branch 50 82 60.9


line true false branch
37 6 14 if delete $col_info{'is_nullable'}
39 2 18 if exists $col_info{'default_value'}
42 0 20 if "JSON" eq ($col_info{'serializer_class'} || '')
43 2 18 if delete $col_info{'is_foreign_key'}
48 0 20 unless defined $out
50 0 20 if ($out->{'extra.unsigned'})
56 2 18 if $out->{'size'} and not $orig_col_info->{'size'}
59 8 12 if (defined $orig_col_info->{'size'} and $orig_col_info->{'size'} =~ /^[0-9]+$/)
63 20 0 if (deparse({%col_info, %$out}) eq deparse({%$orig_col_info})) { }
67 0 4 if exists $out->{$_}
94 4 0 if (defined $parent_ns and not ref $foreignclass and !ref($colmap) || ref $colmap eq 'HASH') { }
96 4 0 if ($foreignclass =~ /^(.*?::)([^:]+)$/ and $1 eq $parent_ns)
99 4 0 ref $colmap eq 'HASH' ? :
111 4 0 if ($options and keys %$options)
119 0 4 unless @out
131 2 0 if (defined $options{'on_update'} and defined $options{'on_delete'} and $options{'on_update'} eq $options{'on_delete'})
136 0 0 $val eq 'RESTRICT' ? :
2 0 $val eq 'CASCADE' ? :
140 2 0 if (defined $options{'cascade_copy'} and defined $options{'cascade_delete'} and $options{'cascade_copy'} eq $options{'cascade_delete'})
145 0 2 $val eq '1' ? :
148 2 2 if keys %options
157 6 16 unless $self->{'_ResultDDL_SchemaLoader'}{$class}{'use_line'}++
158 6 16 if ($method eq 'table') { }
6 10 elsif ($method eq 'add_columns') { }
6 4 elsif ($method eq 'set_primary_key') { }
4 0 elsif ($rel_methods{$method} and @_ == 4) { }
183 4 0 unless $self->{'_ResultDDL_SchemaLoader'}{$class}{'relation_linebreak'}++
234 0 20 unless my $t = delete $col_info->{'data_type'}
238 1 0 $sugar ? :
241 1 0 @out >= 2 && $out[0] eq 'data_type' && $out[1] eq $t ? :
243 0 0 if ($col_info->{'extra'} and $col_info->{'extra'}{'unsigned'})
244 0 0 unless $pl =~ /\w$/
246 0 0 if (1 == keys %{$$col_info{'extra'};}) { }
257 0 143 unless defined $_
258 76 67 if /^(0|[1-9][0-9]*)$/
270 148 0 /^[A-Za-z_][A-Za-z0-9_]*$/ ? :
284 46 0 ref $_ eq 'HASH' ? :
0 46 ref $_ eq 'ARRAY' ? :
6 46 ref $_ eq 'SCALAR' ? :
137 52 !ref($_) ? :
301 0 6 unless eval $perl