Branch Coverage

blib/lib/DBIx/Schema/DSL.pm
Criterion Covered Total %
branch 49 60 81.6


line true false branch
16 0 105 if $pkg eq 'DBIx::Schema::DSL'
54 3 0 if ($opt{'mysql_charset'} and $opt{'mysql_charset'} eq 'utf8mb4')
94 1 2 if (my(@undefined_columns) = _detect_undefined_columns(\@columns, $$index{'fields'}))
101 4 4 unless ref $cols
102 0 8 if (my(@undefined_columns) = _detect_undefined_columns(\@columns, $cols))
108 12 2 if (my $pk = $$data{'primary_key'})
109 9 3 unless ref $pk
110 1 11 if (my(@undefined_columns) = _detect_undefined_columns(\@columns, $pk))
129 1 55 if defined wantarray
131 1 54 if (ref $opt[0] eq 'ARRAY')
136 1 54 if (@opt % 2)
140 0 54 if $data_type eq 'string'
144 0 54 unless my $creating_data = $c->_creating_table
161 50 274 if exists $opt{$key}
168 3 51 if (exists $args{'unsigned'}) { }
9 75 elsif ($c->default_unsigned and $data_type =~ /int(?:eger)?$/) { }
175 1 53 if (exists $args{'on_update'})
179 1 53 if (exists $args{'list'})
184 2 52 if (not exists $args{'is_nullable'} and $c->default_not_null)
188 15 39 if ($args{'data_type'} eq 'VARCHAR' and not $args{'size'})
192 2 52 if ($args{'precision'})
198 12 42 if ($args{'is_primary_key'}) { }
5 37 elsif ($args{'is_unique'}) { }
210 10 0 if ($args{'is_nullable'} and not exists $args{'default_value'} and not $args{'data_type'} =~ /^(?:TINY|MEDIUM|LONG)?(?:TEXT|BLOB)$/)
218 7 2 if (defined wantarray) { }
256 0 3 unless my $creating_data = $c->_creating_table
265 0 2 unless my $creating_data = $c->_creating_table
270 0 2 $type ? :
280 0 1 unless my $creating_data = $c->_creating_table
295 0 4 unless my $creating_data = $c->_creating_table