Branch Coverage

blib/lib/DBIx/SchemaChecksum.pm
Criterion Covered Total %
branch 33 54 61.1


line true false branch
76 15 0 if (Class::Load::try_load_class($class))
99 0 13 if ($ref eq 'ARRAY') { }
13 0 elsif ($ref eq 'HASH') { }
140 0 59 unless $table =~ /^"?(?<schema>[^"]+)"?\."?(?<table>[^"]+)"?$/
146 39 20 unless $table_data
164 13 7 if scalar @primary_keys
171 49 0 if $column_data
177 20 0 if ($sth_fk)
183 0 20 if keys %$fk
196 0 49 if (my $default = $relevants->{'COLUMN_DEF'})
197 0 0 if ($default =~ /nextval/)
199 0 0 if ($1)
218 0 9 unless $dir
219 2 7 unless -d $dir
221 0 7 if $self->verbose
229 0 0 unless ($pre or $post)
230 0 0 if $self->verbose
234 3 15 if ($pre eq $post)
235 3 0 if ($update_info{$pre}) { }
238 6 0 unless $item eq 'SAME_CHECKSUM'
247 3 15 if ($update_info{$pre} and $update_info{$pre}[0] eq 'SAME_CHECKSUM') { }
250 3 0 if ($post eq $pre) { }
264 6 1 if %update_info
271 1 21 unless $filename
275 1 20 unless open my $fh, '<', $filename
277 39 75 if (/^--\s+(pre|post)SHA1sum:?\s+([0-9A-Fa-f]{40,})\s+$/)
282 1 39 unless $checksums{$_}