Branch Coverage

lib/App/TimeTracker/Command/Core.pm
Criterion Covered Total %
branch 32 100 32.0


line true false branch
22 1 4 unless ($self->has_current_project)
43 3 6 unless ($task)
44 3 0 if $dont_exit
65 1 5 if ($task->stop < $task->start)
73 1 0 if $what_you_meant > $task->start
75 1 0 if ($what_you_meant ne $task->start) { }
98 1 1 if (my $task = 'App::TimeTracker::Data::Task'->current($self->home)) { }
1 0 elsif (my $prev = 'App::TimeTracker::Data::Task'->previous($self->home)) { }
125 0 1 if (my $task = 'App::TimeTracker::Data::Task'->current($self->home)) { }
1 0 elsif (my $prev = 'App::TimeTracker::Data::Task'->previous($self->home)) { }
149 0 0 if (my $task = 'App::TimeTracker::Data::Task'->current($self->home)) { }
0 0 elsif (my $prev = 'App::TimeTracker::Data::Task'->previous($self->home)) { }
210 0 0 $self->output ? :
0 0 $self->detail ? :
225 0 0 if $fields{'project'}
226 0 0 if $fields{'tag'}
227 0 0 if $fields{'duration'}
228 0 0 if $fields{'start'}
229 0 0 if $fields{'stop'}
230 0 0 if $fields{'time'}
231 0 0 if $fields{'seconds'}
232 0 0 if $fields{'description'}
233 0 0 if $fields{'file'}
265 0 5 if ($time >= 28800)
276 0 5 if (my $level = $self->detail)
279 0 0 if ($tags and @$tags) { }
289 0 0 if (my $desc = $detail->{'desc'})
293 0 0 if index($report->{$project}{$tags->[0]}{'desc'}, $desc) == -1
312 0 3 if @ancestors
313 3 0 unless @ancestors
330 0 3 if ($parent)
341 3 0 if $data->{'_total'}
342 0 3 if $data->{'_kids'}
343 0 3 unless $sum
351 0 3 if (my $detail = $self->detail)
355 0 0 if $data->{'_untagged'}
362 0 0 if ($detail eq 'description') { }
0 0 elsif ($detail eq 'tag') { }
384 0 0 unless (-e $file)
386 0 0 if ($+{'year'} and $+{'month'})
389 0 0 unless (-e $file)
409 0 2 if (-e $cwd->file('.tracker.json'))
427 2 0 if (-e $projects_file)
443 0 0 unless -f $file
444 0 0 if $file->basename eq 'Core.pm'
463 123 28 unless $method =~ /^cmd_/
470 0 2 if ($self->can('autocomplete') and $self->autocomplete) { }
622 3 3 if (my $last = $self->last) { }
3 0 elsif (my $this = $self->this) { }
636 6 0 if (my $date = $self->this || $self->last) { }