Branch Coverage

blib/lib/OTRS/OPM/Maker/Command/sopm.pm
Criterion Covered Total %
branch 111 162 68.5


line true false branch
45 0 0 unless ($opt->{'config'})
50 0 0 @json_files > 1 ? :
53 0 0 unless ($opt->{'config'})
60 0 0 if not eval { do { $json->decode($json_text); 1 } }
66 0 33 unless ($opt->{'config'})
77 33 0 if $args->[0]
81 0 99 unless ($json->{$needed})
96 3 53 if ('HASH' eq ref $framework)
102 2 54 $min ? :
2 54 $max ? :
111 2 31 if (2 <= keys %major_versions)
134 1 32 if ($product eq 'KIX')
141 15 18 if ($json->{'requires'})
158 33 0 if ($json->{'description'})
164 33 0 if ($json->{'license'})
176 155 0 if substr($_, 0, 1) ne '.' and not $_ =~ m[[\\/]\.]
179 1 32 if ($json->{'exclude_files'} and 'ARRAY' eq ref $json->{'exclude_files'})
186 1 1 if $excluded
194 0 153 $_ =~ /^bin/ ? :
197 1 32 if ($json->{'changes_file'} and -f $config->dir . '/' . $json->{'changes_file'})
227 32 1 unless $json->{'changes'}
232 1 1 if (not ref $change) { }
1 0 elsif ('HASH' eq ref $change) { }
237 1 0 if $change->{'version'}
238 1 0 if $change->{'date'}
241 0 2 unless length $info
275 19 14 unless $json->{'database'}
277 5 22 ref $tmp_version ? :
281 9 23 $version ? :
284 1 31 if ($action->{'uninstall'})
288 0 32 unless $action_code{$op}
290 13 19 if ($op eq 'TableCreate') { }
0 19 elsif ($op eq 'TableDrop') { }
300 3 29 if ($op eq 'ColumnAdd')
302 2 1 unless ($own_tables{$table})
305 0 2 unless $action->{'columns'}
319 10 20 if (%tables_to_delete)
327 61 29 unless $db_actions{$action_type}
337 15 15 unless $json->{'code'}
338 4 25 unless (ref $code)
339 2 2 $code eq 'Uninstall' ? :
356 29 1 unless $json->{'intro'}
361 1 29 if ($opt->{'cvs'})
389 0 30 unless my $fh = 'IO::File'->new($name . '.sopm', 'w')
397 0 2 $intro->{'version'} ? :
399 1 1 ref $intro->{'text'} ? :
401 1 1 $intro->{'lang'} ? :
402 1 1 $intro->{'title'} ? :
416 5 5 $version ? :
421 0 10 unless $action->{'columns'}
422 2 68 ref $column->{'value'} ? :
428 40 30 $column->{'type'} ? :
452 0 13 $version ? :
457 0 13 unless $action->{'columns'}
465 12 24 $column->{'size'} ? :
12 24 $column->{'auto_increment'} ? :
12 24 $column->{'primary_key'} ? :
469 10 2 unless $action->{'unique'}
473 0 2 unless $unique->{'columns'}
481 4 8 unless $action->{'keys'}
485 0 8 unless $key->{'references'}
505 0 3 $version ? :
510 0 3 unless $action->{'columns'}
518 2 0 $column->{'size'} ? :
0 2 $column->{'auto_increment'} ? :
0 2 $column->{'primary_key'} ? :
532 0 2 $version ? :
537 0 2 unless $action->{'columns'}
552 1 0 $version ? :
557 0 1 unless $action->{'references'}
577 1 0 $version ? :
582 0 1 unless $action->{'references'}
602 1 0 $version ? :
608 0 1 unless $action->{'columns'}
625 1 0 $version ? :
643 0 1 $version ? :
648 0 1 unless $action->{'columns'}
657 0 0 $column->{'size'} ? :
0 0 $column->{'auto_increment'} ? :
0 0 $column->{'primary_key'} ? :
678 3 38 unless ($types{$type})