Branch Coverage

blib/lib/DBIx/Migration/Directories.pm
Criterion Covered Total %
branch 106 120 88.3


line true false branch
22 1 20 if ($args{'desired_version_from'} and not $args{'schema'})
26 1 20 unless defined $args{'schema'}
30 0 20 if ($args{'schema'} =~ s/::/-/g and not $args{'desired_version_from'})
41 9 10 unless $$self{'base'}
45 19 0 unless $$self{'schema_dir'}
48 6 13 unless (exists $$self{'dir'})
50 6 0 if defined $dir
53 1 18 unless (-d $$self{'dir'})
57 12 6 if ($$self{'base'} and $$self{'schema'} and not $$self{'common_dir'})
59 8 4 if (-d $common)
66 15 3 unless defined $$self{'current_version'}
67 17 1 unless defined $$self{'desired_version'}
74 6 0 if ($$self{'schema'} and $$self{'base'}) { }
81 6 0 unless (-d $dir)
83 5 1 if (-d $generic_dir)
96 17 5 if (@_ == 2) { }
107 7 16 if ($$self{'desired_version_from'}) { }
113 3 4 unless (defined ${$vvar;})
116 1 2 if ($@)
121 4 2 if (defined ${$svar;}) { }
1 1 elsif (defined ${$vvar;}) { }
122 0 4 if (ref ${$svar;} and ${$svar;}->can('numify')) { }
128 0 1 if (ref ${$vvar;} and ${$vvar;}->can('numify')) { }
152 15 2 unless ($@)
170 1 17 unless my $version = $self->detect_desired_version
182 0 32 unless opendir my $dh, $dir
195 106 16 if (defined $to)
225 8 71 if ($from_ver == $to_ver)
229 1 70 unless ($$self{'migrations'}{$from_ver})
233 28 42 if ($$self{'migrations'}{$from_ver}{$to_ver})
246 32 10 if ($to_ver)
250 15 27 unless (@candidates)
258 27 10 if (@path)
263 0 27 unless (@rv)
281 40 72 if not /^\./ || /\~$/
282 36 1 opendir($d, $dn) ? :
304 33 2 if ($$self{'common_dir'} and $dir ne $$self{'common_dir'}) { }
306 2 31 if (-d $d1 and -d $d2) { }
6 25 elsif (-d $d2) { }
321 31 2 exists $$self{'_current_version'} ? :
325 27 6 defined $$self{$ver} ? :
328 6 27 if ($ins) { }
351 30 2 if (not $$self{'schema'} or $$self{'schema'} ne $schema or $self->version_as_number($to))
384 2 16 if ($$self{'schema'} eq $schema and not $self->version_as_number($to)) { }
402 8 1 if (defined $$self{'desired_version'}) { }
432 1 4 if ($$self{'schema'} eq $schema) { }
435 3 1 if ($self->migrate_migration(%args)) { }
451 1 6 if ($@)
456 4 2 if ($rv) { }
457 2 2 if ($$self{'schema'} ne $schema)
458 0 2 unless ($self->delete_schema_record)
465 0 4 if ($dbh->transaction_error) { }
481 1 4 if ($$self{'schema'} eq $schema) { }
487 1 3 if (scalar keys %$schemas) { }
494 1 2 if ($@)
499 1 1 if ($rv) { }
502 0 1 if ($@)
507 1 0 if ($rv) { }
533 0 43 if ($@) { }
19 24 elsif (not defined $version) { }