Branch Coverage

blib/lib/OPM/Maker/Command/sopm.pm
Criterion Covered Total %
branch 116 170 68.2


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)
133 1 35 if ($product eq "KIX")
140 16 20 if ($json->{'requires'})
157 36 0 if ($json->{'description'})
163 36 0 if ($json->{'license'})
175 166 0 if substr($_, 0, 1) ne "." and not $_ =~ m[[\\/]\.]
178 1 35 if ($json->{'exclude_files'} and "ARRAY" eq ref $json->{'exclude_files'})
181 1 0 unless grep {$_ eq $ignore_name;} @{$$json{"exclude_files"};}
189 1 1 if $excluded
193 0 1 unless my $fh = "IO::File"->new($ignore_name, "w")
203 0 164 $_ =~ /^bin/ ? :
206 1 35 if ($json->{'changes_file'} and -f $config->dir . "/" . $json->{'changes_file'})
236 35 1 unless $json->{'changes'}
241 1 1 if (not ref $change) { }
1 0 elsif ('HASH' eq ref $change) { }
246 1 0 if $change->{'version'}
247 1 0 if $change->{'date'}
250 0 2 unless length $info
284 20 16 unless $json->{'database'}
286 8 24 ref $tmp_version ? :
290 12 28 $version ? :
293 1 39 if ($action->{'uninstall'})
297 0 40 unless $action_code{$op}
301 15 25 if ($op eq 'TableCreate') { }
0 25 elsif ($op eq 'TableDrop') { }
311 3 37 if ($op eq "ColumnAdd")
313 2 1 unless ($own_tables{$table})
316 0 2 unless $action->{'columns'}
330 11 22 if (%tables_to_delete)
339 164 34 unless $db_actions{$action_type}{$phase}
349 17 16 unless $json->{'code'}
350 4 26 unless (ref $code)
351 2 2 $code eq 'Uninstall' ? :
360 1 29 if ($code->{'inline'})
374 32 1 unless $json->{'intro'}
379 1 32 if ($opt->{'cvs'})
407 0 33 unless my $fh = "IO::File"->new($name . ".sopm", "w")
430 0 1 $code->{'version'} ? :
443 0 2 $intro->{'version'} ? :
445 1 1 ref $intro->{'text'} ? :
447 1 1 $intro->{'lang'} ? :
448 1 1 $intro->{'title'} ? :
462 8 8 $version ? :
467 0 16 unless $action->{'columns'}
468 6 106 ref $column->{'value'} ? :
474 64 48 $column->{'type'} ? :
498 0 15 $version ? :
503 0 15 unless $action->{'columns'}
511 14 28 $column->{'size'} ? :
14 28 $column->{'auto_increment'} ? :
14 28 $column->{'primary_key'} ? :
515 10 4 unless $action->{'unique'}
519 0 4 unless $unique->{'columns'}
527 4 10 unless $action->{'keys'}
531 0 10 unless $key->{'references'}
551 0 3 $version ? :
556 0 3 unless $action->{'columns'}
564 2 0 $column->{'size'} ? :
0 2 $column->{'auto_increment'} ? :
0 2 $column->{'primary_key'} ? :
578 0 2 $version ? :
583 0 2 unless $action->{'columns'}
598 1 0 $version ? :
603 0 1 unless $action->{'references'}
623 1 0 $version ? :
628 0 1 unless $action->{'references'}
648 1 0 $version ? :
654 0 1 unless $action->{'columns'}
671 1 0 $version ? :
689 0 1 $version ? :
694 0 1 unless $action->{'columns'}
703 0 0 $column->{'size'} ? :
0 0 $column->{'auto_increment'} ? :
0 0 $column->{'primary_key'} ? :
724 3 44 unless ($types{$type})