Branch Coverage

blib/lib/Net/SecurityCenter/Utils.pm
Criterion Covered Total %
branch 36 70 51.4


line true false branch
76 0 1 unless $string
105 0 0 if $language
145 1 1 if ($params->{'type'} eq 'now')
154 1 0 if ($params->{'type'} eq 'ical')
184 0 0 exists $template->{$key}{'required'} ? :
192 0 0 if (@usage_req_args)
220 0 128 if (exists $tmpl->{'required'} and not exists $args->{$key})
224 0 0 if (defined $tmpl->{'messages'}{'required'})
233 3 125 if (exists $tmpl->{'default'})
241 0 32 unless exists $template->{$key}
247 1 31 if (exists $tmpl->{'filter'} and ref $tmpl->{'filter'} eq 'CODE')
251 27 5 if (exists $tmpl->{'allow'})
253 2 25 if (ref $value eq 'ARRAY') { }
257 0 5 unless (allow($_, $tmpl->{'allow'}))
266 0 25 unless (allow($value, $tmpl->{'allow'}))
270 0 0 if (ref $tmpl->{'allow'} eq 'ARRAY')
276 0 0 if (ref $tmpl->{'allow'} eq 'Regexp')
280 0 0 if (exists $tmpl->{'messages'}{'allow'})
292 0 32 if (exists $tmpl->{'post_filter'} and ref $tmpl->{'post_filter'} eq 'CODE')
296 3 29 if ($key eq 'fields')
298 2 1 if (ref $value eq 'ARRAY')
306 0 32 if (exists $tmpl->{'remap'})
325 21 196 if ($scanner_status >= $_)
366 46 908 if (ref $data->{$item} eq 'HASH')
369 43 0 if ($item =~ /(Update|Date|Time)$/ and $data->{$item} =~ /\d+/ and ref $data->{$item} ne 'Time::Piece')
375 11 3221 if (exists $data->{$field} and ref $data->{$field} ne 'Time::Piece')
381 5 399 if (exists $data->{$field} and ref $data->{$field} ne 'Time::Seconds')
415 0 10 unless exists $data->{$type}
422 16 20 if (exists $hash{$item->{'id'}}) { }
443 1 5 if (ref $data eq 'ARRAY')
452 0 0 $_[0] == 1 ? :
459 0 0 if (ref $date eq 'Time::Piece')
463 0 0 if ($date =~ /^\d{4}-\d{2}-\d{2}$/)
468 0 0 if ($date =~ /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/)
473 0 0 if ($date =~ /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/)