Branch Coverage

blib/lib/NBI/Opts.pm
Criterion Covered Total %
branch 89 168 52.9


line true false branch
59 115 3 if (substr($_[0], 0, 1) eq "-")
67 114 754 if ($i =~ /^-queue/u) { }
112 642 elsif ($i =~ /^-threads/u) { }
112 530 elsif ($i =~ /^-memory/u) { }
112 418 elsif ($i =~ /^-tmpdir/u) { }
101 317 elsif ($i =~ /^-(mail|email_address)/u) { }
101 216 elsif ($i =~ /^-(when|email_type)/u) { }
101 115 elsif ($i =~ /^-opts/u) { }
112 3 elsif ($i =~ /^-time/u) { }
1 2 elsif ($i =~ /^-placeholder/u) { }
1 1 elsif ($i =~ /^-files/u) { }
0 1 elsif ($i =~ /^-start_time/u) { }
0 1 elsif ($i =~ /^-start_date/u) { }
68 0 114 unless defined $data{$i}
74 0 112 unless defined $data{$i}
76 112 0 if ($data{$i} =~ /^\d+$/u) { }
85 0 112 unless defined $data{$i}
91 0 112 unless defined $data{$i}
96 0 101 unless defined $data{$i}
101 0 101 unless defined $data{$i}
107 0 101 unless defined $data{$i}
109 0 101 if (ref $data{$i} ne "ARRAY")
122 0 1 unless (defined $data{$i})
125 0 1 if ($data{$i} =~ /[\*\+\?]/u)
133 0 1 if (ref $data{$i} ne 'ARRAY') { }
141 0 0 unless defined $data{$i}
146 0 0 unless defined $data{$i}
158 114 3 defined $queue ? :
159 112 5 defined $threads ? :
160 112 5 defined $memory ? :
161 112 5 defined $hours ? :
162 112 5 defined $tmpdir ? :
163 101 16 defined $email_address ? :
164 101 16 defined $email_when ? :
165 1 116 defined $files ? :
166 1 116 defined $placeholder ? :
168 101 16 defined $opts_array->[0] ? :
185 0 123 if defined $new_val
192 0 117 if defined $new_val
199 0 117 if defined $new_val
206 0 117 if defined $new_val
213 0 117 if defined $new_val
221 0 118 if defined $new_val
228 0 327 if defined $new_val
233 0 0 if defined $new_val
239 0 0 if defined $new_val
251 0 117 if defined $new_val
258 0 339 if defined $new_val
265 117 0 unless (defined $self->{'opts'})
270 0 0 if ref $new_val ne "ARRAY"
271 0 0 if defined $new_val
284 1 0 defined $self->{'opts'} ? :
297 0 203 if defined $begin
300 203 0 if defined $o
320 202 6 if (defined $self->{'email_address'})
327 0 203 unless defined $o
332 1 207 if ($self->is_array)
338 0 208 if defined $begin
354 103 9 if ($mem =~ /^(\d+)$/u) { }
9 0 elsif ($mem =~ /^(\d+)\.?(MB?|GB?|TB?|KB?)$/iu) { }
358 9 0 if (substr(uc $2, 0, 1) eq 'G') { }
0 0 elsif (substr(uc $2, 0, 1) eq 'T') { }
0 0 elsif (substr(uc $2, 0, 1) eq 'M') { }
0 0 elsif (substr(uc $2, 0, 1) eq 'K') { }
381 1 114 if ($time =~ /^(\d+)$/u) { }
389 102 315 if ($unit eq 'D') { }
112 203 elsif ($unit eq 'H') { }
102 101 elsif ($unit eq 'M') { }
101 0 elsif ($unit eq 'S') { }
409 0 0 unless ($time =~ /^(\d{1,2}):(\d{2})(?::(\d{2}))?$/u)
413 0 0 if $h > 23
414 0 0 if $m > 59
415 0 0 if $s > 59
426 0 0 if $date =~ /^\d{4}-\d{2}-\d{2}$/u
428 0 0 unless ($date =~ m[^(\d{1,2})/(\d{1,2})(?:/(\d{4}))?$]u)
432 0 0 if $mon < 1 or $mon > 12
433 0 0 if $day < 1 or $day > 31
435 0 0 unless (defined $year)
441 0 0 $candidate >= $today_midnight ? :
447 0 0 if ($check[3] != $day or $check[4] + 1 != $mon or $check[5] + 1900 != $year)
459 411 0 unless defined $self->{'start_time'} or defined $self->{'start_date'}
463 0 0 defined $self->{'start_time'} ? :
467 0 0 if (defined $self->{'start_date'}) { }
473 0 0 if ($today_begin > time) { }