Branch Coverage

blib/lib/App/Dochazka/CLI/Util.pm
Criterion Covered Total %
branch 50 104 48.0


line true false branch
169 0 15 unless (ref $status)
172 15 0 unless $status->ok
199 2 6 if ($App::Dochazka::CLI::Util::prompt_month < 1 or $App::Dochazka::CLI::Util::prompt_month > 12)
210 5 6 if ($token =~ /^$subtoken,/u) { }
6 0 elsif ($token =~ /^$subtoken$/u) { }
220 4 7 if (my($begin, $end) = $subtoken =~ /^(\d{1,2})-(\d{1,2})$/u) { }
221 0 4 if ($begin >= $end)
254 0 0 defined $s_key ? :
257 0 0 $s_key ? :
262 0 0 $status->ok ? :
283 0 0 if $App::Dochazka::CLI::Util::debug_mode
285 0 0 unless $ARGS{'key'} =~ /=/u
288 0 0 $ARGS{'minimal'} ? :
291 0 0 if ($key_spec =~ /^emp/iu) { }
0 0 elsif ($key_spec =~ /^nic/iu) { }
0 0 elsif ($key_spec =~ /^sec/iu) { }
0 0 elsif ($key_spec =~ /^eid/iu) { }
294 0 0 if $status->not_ok and $status->payload and $status->payload->{'http_code'} == 403
295 0 0 if ($status->not_ok and $status->payload and $status->payload->{'http_code'} == 404)
297 0 0 if ($status->not_ok and $status->payload and $status->payload->{'http_code'} != 500 and &looks_like_number($key))
309 0 0 defined $key_spec ? :
324 0 0 if $App::Dochazka::CLI::Util::site->DOCHAZKA_CLI_LOG_FILE_RESET
341 16 26 unless $App::Dochazka::CLI::Util::prompt_date
358 1 14 unless defined $alpha
361 2 12 unless exists $month_map{$month}
435 2 24 unless (defined $rd and length $rd > 0)
441 5 19 if ($rd =~ /\A\d{4,4}-\d{1,2}-\d{1,2}\z/u) { }
2 17 elsif ($rd =~ /\A\d{2,2}-\d{1,2}-\d{1,2}\z/u) { }
6 11 elsif ($rd =~ /\A\d{1,2}-\d{1,2}\z/u) { }
2 9 elsif ($rd =~ /\Atod/iu) { }
1 8 elsif ($rd =~ /\Atom/iu) { }
1 7 elsif ($rd =~ /\Ayes/iu) { }
2 5 elsif ($rd =~ /\A[\+\-]\d{1,3}\z/u) { }
458 2 0 if (check_date($+{'yyyy'}, $+{'mm'}, $+{'dd'})) { }
475 2 17 unless $+{'yyyy'} and $+{'mm'} and $+{'dd'}
480 2 15 unless check_date($year, $month, $day)
518 0 1 unless $rt
523 0 1 unless defined $hours and defined $minutes
525 0 1 if $hours eq '0'
526 0 1 if $minutes eq '0'
527 0 1 unless $hours and $minutes
545 117 0 if ($PARAMHASH{'PARSE_TEST'})
561 0 0 if ($status->not_ok)
589 0 0 if $App::Dochazka::CLI::Util::debug_mode
595 0 0 if (ref $status->payload eq '') { }
0 0 elsif (ref $status->payload eq 'HASH') { }
613 0 0 $status->code eq $status->text ? :
617 0 0 $status->payload->{'permanent'} ? :
657 3 11 unless defined $mlen
659 8 6 unless $len > $mlen
661 6 0 if $len > $mlen
662 2 4 if $mlen == 0