Branch Coverage

blib/lib/Mojo/mysql/Migrations.pm
Criterion Covered Total %
branch 0 44 0.0


line true false branch
25 0 0 unless defined $sql
33 0 0 if ($sql =~ /^$delimiter/ux) { }
0 0 elsif ($sql =~ /^delimiter\s+(\S+)\s*(?:\n|\z)/ipu) { }
0 0 elsif ($sql =~ /^(\s+)/su or $sql =~ /^(\w+)/u) { }
0 0 elsif ($sql =~ /^--.*(?:\n|\z)/pu or $sql =~ /^\#.*(?:\n|\z)/pu or $sql =~ m[^/\*(?:[^\*]|\*[^/])*(?:\*/|\*\z|\z)]pu or $sql =~ /^'(?:[^'\\]*|\\(?:.|\n)|'')*(?:'|\z)/pu or $sql =~ /^"(?:[^"\\]*|\\(?:.|\n)|"")*(?:"|\z)/pu or $sql =~ /^`(?:[^`]*|``)*(?:`|\z)/pu) { }
64 0 0 if ($token =~ /^--\s+(\d+)\s*(up|down)/iu)
66 0 0 if $version and not $last =~ /^\s*$/su
71 0 0 if ($new) { }
72 0 0 if $version and not $last =~ /^\s*$/su
79 0 0 if $version and not $last =~ /^\s*$/su
85 0 0 unless (sort {$a <=> $b;} keys %{(shift())->{"migrations"}{"up"};})[-1]
95 0 0 if $target != 0 and not $up->{$target}
99 0 0 if $self->_active($db, 1) == $target
103 0 0 if (my $active = $self->_active($db, 1)) == $target
106 0 0 if $active > $latest
110 0 0 if ($active < $target) { }
112 0 0 if $_ <= $target and $_ > $active
119 0 0 if $_ > $target and $_ <= $active
128 0 0 if (my $error = $@)
142 0 0 unless $create or $results
143 0 0 if ($results and my $next = $results->array)
146 0 0 if $error