Branch Coverage

blib/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm
Criterion Covered Total %
branch 77 108 71.3


line true false branch
132 46 74 if /\.(?:sql|pl|sql-\w+)$/
136 0 10 unless $self->ignore_ddl
140 19 34 if /\.(?:sql|pl)$/
141 19 0 unless ($files{$filename})
166 1 2 unless -d $dir
169 4 4 if /\.yml$/
181 20 1 unless -d $dir
184 1 2 if /\.pl$/
196 9 0 unless -d $dir
199 0 0 if /\.pl$/
208 33 86 unless -d $dirname
216 21 0 unless -d $dirname
236 16 2 unless -d $dirname
244 5 1 unless -d $dirname
292 332 4 if $storage_class ne 'mysql' or /^(?!DELIMITER\s+)/i
323 7 10 if $f2p{"$file"}
328 0 10 if length($pkgbase) + length($package) > $maxlen
353 0 17 if $@
355 0 17 unless ref $fn and ref $fn eq 'CODE'
378 10 73 unless $self->txn_wrap
389 10 39 if $self->ignore_ddl
391 12 37 $sql_to_run ? :
394 0 66 if ($self->ignore_ddl and $filename->basename =~ /^[^-]*-auto.*\.sql$/) { }
51 15 elsif ($filename =~ /\.sql$/) { }
15 0 elsif ($filename =~ /\.pl$/) { }
416 3 15 if ($self->ignore_ddl)
441 3 0 if ($filename =~ /^(.+)\.pl$/) { }
448 0 3 if ($@) { }
3 0 elsif (ref $fn eq 'CODE') { }
476 1 29 unless -e $prefilename
486 0 30 unless my $out = $t->translate($prefilename)
491 30 0 unless $source_schema->name
500 0 30 unless -e $filename
510 0 30 unless my $out = $t->translate($filename)
515 30 0 unless $dest_schema->name
539 1 29 if (not $self->txn_prep and $self->txn_wrap)
542 1 0 if $stmts[$i] =~ /^BEGIN;/
558 3 44 ref $actual_file ? :
568 0 48 unless (@sql)
586 0 44 unless my $sql = $self->_sql_from_yaml($sqltargs, $from_file, $db)
589 0 44 if (-e $filename)
590 0 0 if ($self->force_overwrite) { }
609 2 18 unless -d $dirname
620 2 40 unless -d $dirname
629 0 2 unless my $source = $args->{'result_source'}
631 0 2 unless my $version = $args->{'version'}
710 1 23 if (-e $diff_file)
711 0 1 if ($self->force_overwrite) { }
728 0 51 unless $file
743 3 5 if ($self->ignore_ddl)
763 4 17 if ($self->ignore_ddl)
792 0 57 unless $yml
795 1 56 if (-e $filename)
796 0 1 if ($self->force_overwrite) { }