Branch Coverage

blib/lib/DBIx/Simple/Class/Schema.pm
Criterion Covered Total %
branch 54 60 90.0


line true false branch
19 0 6 if $_[2]
20 5 1 $_[1] && exists $$schemas{$_[1]} ? :
26 0 4 unless $$args{'namespace'}
53 8 0 if $sth
74 2 50 if ($$col{'COLUMN_NAME'} =~ /\W/) { }
2 48 elsif ($class->SUPER::can($$col{'COLUMN_NAME'})) { }
84 32 20 if ($$col{'IS_NULLABLE'} eq 'NO')
88 20 32 if ($$col{'COLUMN_DEF'} and not $$col{'COLUMN_DEF'} =~ /NULL/i)
94 18 34 if ($size >= 65535 or $size == 0)
97 16 36 if ($$col{'TYPE_NAME'} =~ /INT/i) { }
8 28 elsif ($$col{'TYPE_NAME'} =~ /FLOAT|DOUBLE|DECIMAL/i) { }
24 4 elsif ($$col{'TYPE_NAME'} =~ /CHAR|TEXT|CLOB/i) { }
108 2 3 unless $_[0] =~ /^.{1,$size}$/x
118 4 29 if defined $_[1]
128 2 2 if ($class->_MAKE_SCHEMA)
166 6 2 if $class->_MAKE_SCHEMA
202 2 2 if $class->_MAKE_SCHEMA
207 3 1 if (defined wantarray)
208 1 2 if (wantarray) { }
220 2 2 unless ($$args{'namespace'})
222 2 0 if ($$args{'namespace'} =~ /(database|dbname|db)=([^;]+);?/x)
240 1 3 if (wantarray)
265 4 3 if (eval "require $namespace" and $class->_MAKE_SCHEMA)
275 2 5 unless (-d $schema_path)
276 0 2 unless eval { do { File::Path::make_path($schema_path) } }
280 5 2 if ($class->_MAKE_SCHEMA)
281 1 4 if $$args{'overwrite'} and $class->DEBUG
291 9 12 if -f "$schema_path/$filename" and not $$args{'overwrite'}
292 3 9 if $$args{'overwrite'} and $class->DEBUG
295 12 0 if (defined $fh) { }