Branch Coverage

blib/lib/OPM/Maker/Command/sopm.pm
Criterion Covered Total %
branch 114 166 68.6


line true false branch
43 0 0 unless ($opt->{'config'})
48 0 0 @json_files > 1 ? :
51 0 0 unless ($opt->{'config'})
58 0 0 if not eval { do { $json->decode($json_text); 1 } }
64 0 36 unless ($opt->{'config'})
75 36 0 if $args->[0]
79 0 108 unless ($json->{$needed})
94 3 58 if ("HASH" eq ref $framework)
100 2 59 $min ? :
2 59 $max ? :
109 2 34 if (2 <= keys %major_versions)
132 1 35 if ($product eq "KIX")
139 16 20 if ($json->{'requires'})
156 36 0 if ($json->{'description'})
162 36 0 if ($json->{'license'})
174 166 0 if substr($_, 0, 1) ne "." and not $_ =~ m[[\\/]\.]
177 1 35 if ($json->{'exclude_files'} and "ARRAY" eq ref $json->{'exclude_files'})
184 1 1 if $excluded
192 0 164 $_ =~ /^bin/ ? :
195 1 35 if ($json->{'changes_file'} and -f $config->dir . "/" . $json->{'changes_file'})
225 35 1 unless $json->{'changes'}
230 1 1 if (not ref $change) { }
1 0 elsif ('HASH' eq ref $change) { }
235 1 0 if $change->{'version'}
236 1 0 if $change->{'date'}
239 0 2 unless length $info
273 20 16 unless $json->{'database'}
275 8 24 ref $tmp_version ? :
279 12 28 $version ? :
282 1 39 if ($action->{'uninstall'})
286 0 40 unless $action_code{$op}
290 15 25 if ($op eq 'TableCreate') { }
0 25 elsif ($op eq 'TableDrop') { }
300 3 37 if ($op eq "ColumnAdd")
302 2 1 unless ($own_tables{$table})
305 0 2 unless $action->{'columns'}
319 11 22 if (%tables_to_delete)
328 164 34 unless $db_actions{$action_type}{$phase}
338 17 16 unless $json->{'code'}
339 4 26 unless (ref $code)
340 2 2 $code eq 'Uninstall' ? :
349 1 29 if ($code->{'inline'})
363 32 1 unless $json->{'intro'}
368 1 32 if ($opt->{'cvs'})
396 0 33 unless my $fh = "IO::File"->new($name . ".sopm", "w")
419 0 1 $code->{'version'} ? :
432 0 2 $intro->{'version'} ? :
434 1 1 ref $intro->{'text'} ? :
436 1 1 $intro->{'lang'} ? :
437 1 1 $intro->{'title'} ? :
451 8 8 $version ? :
456 0 16 unless $action->{'columns'}
457 6 106 ref $column->{'value'} ? :
463 64 48 $column->{'type'} ? :
487 0 15 $version ? :
492 0 15 unless $action->{'columns'}
500 14 28 $column->{'size'} ? :
14 28 $column->{'auto_increment'} ? :
14 28 $column->{'primary_key'} ? :
504 10 4 unless $action->{'unique'}
508 0 4 unless $unique->{'columns'}
516 4 10 unless $action->{'keys'}
520 0 10 unless $key->{'references'}
540 0 3 $version ? :
545 0 3 unless $action->{'columns'}
553 2 0 $column->{'size'} ? :
0 2 $column->{'auto_increment'} ? :
0 2 $column->{'primary_key'} ? :
567 0 2 $version ? :
572 0 2 unless $action->{'columns'}
587 1 0 $version ? :
592 0 1 unless $action->{'references'}
612 1 0 $version ? :
617 0 1 unless $action->{'references'}
637 1 0 $version ? :
643 0 1 unless $action->{'columns'}
660 1 0 $version ? :
678 0 1 $version ? :
683 0 1 unless $action->{'columns'}
692 0 0 $column->{'size'} ? :
0 0 $column->{'auto_increment'} ? :
0 0 $column->{'primary_key'} ? :
713 3 44 unless ($types{$type})