| line |
!l |
l&&!r |
l&&r |
condition |
|
3
|
1 |
0 |
0 |
@ARGV and @ARGV[0] =~ /^\w/ |
|
93
|
0 |
0 |
0 |
@_ and -f $_[0] |
|
122
|
0 |
0 |
0 |
&blessed($val) and $val->can('ymd') |
|
188
|
0 |
0 |
0 |
$self->config('hours_per_month') and $res->{'interval'} eq 'month' |
|
202
|
0 |
0 |
0 |
$start and $stop |
|
315
|
0 |
0 |
0 |
$k eq 'stop' and $event->{$k} |
|
391
|
0 |
0 |
0 |
-r $previous && 'App::tt::file'->new($previous->slurp) |
|
393
|
0 |
0 |
0 |
$trc_file && -r $trc_file |
|
451
|
0 |
0 |
0 |
$res->{'start_at'} = $1 and $res->{'interval'} = $2 |
|
474
|
0 |
0 |
0 |
@project_re and not grep({$event->{'project'} =~ /$_/;} @project_re) |
|
475
|
0 |
0 |
0 |
$tags and not grep({$tags =~ /\b$_\b/;} @{$$event{'tags'};}) |
|
484
|
0 |
0 |
0 |
@{$res->{'log'};} and not $res->{'log'}[-1]{'project'} |
|
|
0 |
0 |
0 |
@{$res->{'log'};} and not $res->{'log'}[-1]{'project'} and $res->{'log'}[-1]{'start'}->mday == $event->{'start'}->mday |
|
500
|
0 |
0 |
0 |
$self->month and not $self->year |
|
514
|
0 |
0 |
0 |
-t STDIN and $self->year || $self->month |
|
528
|
0 |
0 |
0 |
$code and $self->$code($event) |
|
545
|
0 |
0 |
0 |
$event->{'stop'} && $event->{'start'} && $event->{'stop'} - $event->{'start'} |
|
548
|
0 |
0 |
0 |
$event->{'stop'} and $event->{'seconds'} < $self->config('min_time') |
|
605
|
5 |
0 |
2 |
not $hms and $ymd =~ /:/ |
|
646
|
0 |
0 |
0 |
$start->day_of_week != 0 and $start->day_of_week != 6 |
| line |
l |
!l |
condition |
|
65
|
0 |
1 |
$ENV{'APP_TT_DEBUG'} || 0 |
|
121
|
0 |
0 |
$event->{$_} // '' |
|
141
|
0 |
0 |
shift() || 'app' |
|
173
|
0 |
0 |
$event->{'project'} || '---' |
|
297
|
0 |
0 |
$ENV{'EDITOR'} || 'nano' |
|
|
0 |
0 |
$ENV{'TT_COLUMNS'} || 'date,project,hours,rounded,tags,description' |
|
|
0 |
0 |
$ENV{'TT_HOURS_PER_MONTH'} || 0 |
|
|
0 |
0 |
$ENV{'TT_MIN_TIME'} || 300 |
|
|
0 |
0 |
$ENV{'TT_ROUND_UP_AT'} || 30 |
|
|
0 |
0 |
$self->{'defaults'} ||= {'editor', $ENV{'EDITOR'} || 'nano', 'export_columns', $ENV{'TT_COLUMNS'} || 'date,project,hours,rounded,tags,description', 'hours_per_month', $ENV{'TT_HOURS_PER_MONTH'} || 0, 'min_time', $ENV{'TT_MIN_TIME'} || 300, 'round_up_at', $ENV{'TT_ROUND_UP_AT'} || 30} |
|
301
|
0 |
0 |
($self->{'config'}{$key} // $self->{'defaults'}{$key}) // die("Missing option '${key}'.\n") |
|
308
|
0 |
0 |
$event->{'path'} //= 'Not found' |
|
316
|
0 |
0 |
$event->{$k} // '' |
|
333
|
0 |
0 |
unlink $trc_file or die "rm ${trc_file}: $!" |
|
349
|
0 |
0 |
$row->[$col] //= '' |
|
351
|
0 |
0 |
$spec[$col] // 0 |
|
354
|
0 |
0 |
$width // 0 |
|
403
|
0 |
0 |
$log{$k} ||= {%$e, 'seconds', 0} |
|
446
|
0 |
0 |
$self->project || '.+' |
|
454
|
0 |
0 |
$res->{'fill'} ||= 1 |
|
457
|
0 |
0 |
$res->{'fill'} ||= 0 |
|
458
|
0 |
0 |
$res->{'interval'} ||= 'month' |
|
459
|
0 |
0 |
$res->{'start_at'} ||= 0 |
|
490
|
0 |
0 |
$self->group_by || 'nothing' |
|
506
|
0 |
0 |
$self->year || '\\d{4}' |
|
507
|
0 |
0 |
$self->month || '\\d{2}' |
|
509
|
0 |
0 |
$self->project || '[^.]+' |
|
529
|
0 |
0 |
unlink $info{'file'} or die "rm $info{'file'}: $!" |
|
538
|
0 |
0 |
$event->{'__CLASS__'} ||= 'App::TimeTracker::Data::Task' |
|
539
|
0 |
0 |
$self->description // '' |
|
541
|
0 |
0 |
$event->{'seconds'} ||= 0 |
|
542
|
0 |
0 |
$event->{'tags'} ||= [&uniq(@{[] unless $event->{'tags'};}, $self->_tags)] |
|
543
|
0 |
0 |
$event->{'user'} ||= scalar getpwuid $< |
|
596
|
0 |
0 |
$! || 1 |
| line |
l |
!l&&r |
!l&&!r |
condition |
|
23
|
0 |
0 |
0 |
ref $class || $class |
|
88
|
0 |
0 |
0 |
$ENV{'TT_HOME'} || $ENV{'TIMETRACKER_HOME'} || ('File::HomeDir'->my_home, '.TimeTracker') |
|
|
0 |
0 |
0 |
+(shift())->{'root'} //= 'App::tt::file'->new($ENV{'TT_HOME'} || $ENV{'TIMETRACKER_HOME'} || ('File::HomeDir'->my_home, '.TimeTracker')) |
|
94
|
0 |
0 |
0 |
$self->year or $self->month |
|
|
0 |
0 |
0 |
$self->year or $self->month or not -t STDIN |
|
207
|
0 |
0 |
0 |
$self->project || $self->config('project') |
|
234
|
0 |
0 |
0 |
$event->{'project'} ||= $self->project |
|
235
|
0 |
0 |
0 |
$event->{'project'} ||= (grep {/^[A-Za-z0-9-]+$/;} @args)[0] |
|
236
|
0 |
0 |
0 |
$event->{'project'} ||= 'App::tt::file'->new->basename |
|
237
|
0 |
0 |
0 |
$event->{'project'} ||= $self->config('project') |
|
301
|
0 |
0 |
0 |
$self->{'config'}{$key} // $self->{'defaults'}{$key} |
|
315
|
0 |
0 |
0 |
$k eq 'start' or $k eq 'stop' and $event->{$k} |
|
452
|
0 |
0 |
0 |
$res->{'start_at'} ||= $1 |
|
453
|
0 |
0 |
0 |
$res->{'interval'} ||= $1 |
|
476
|
0 |
0 |
0 |
$event->{'stop'} ||= $NOW + $NOW->tzoffset |
|
477
|
0 |
0 |
0 |
$event->{'seconds'} ||= $event->{'stop'} - $event->{'start'} |
|
514
|
0 |
0 |
0 |
$self->year || $self->month |
|
539
|
0 |
0 |
0 |
$event->{'description'} ||= $self->description // '' |
|
540
|
0 |
0 |
0 |
$self->project || $self->config('project') |
|
|
0 |
0 |
0 |
$event->{'project'} ||= $self->project || $self->config('project') |
|
577
|
0 |
0 |
0 |
not $event->{'start'} or $event->{'stop'} |
|
614
|
0 |
7 |
0 |
$t{'ref'} || $NOW |
|
616
|
2 |
5 |
0 |
$t{'Y'} ||= $ref->year |
|
617
|
3 |
4 |
0 |
$t{'m'} //= $ref->mon |
|
618
|
5 |
2 |
0 |
$t{'d'} //= $ref->mday |
|
619
|
4 |
0 |
0 |
defined $t{'H'} || defined $t{'M'} |
|
|
3 |
0 |
4 |
$t{'S'} //= defined $t{'H'} || defined $t{'M'} ? 0 : $ref->second |
|
620
|
4 |
0 |
3 |
$t{'M'} //= defined $t{'H'} ? 0 : $ref->min |
|
621
|
7 |
0 |
0 |
$t{'H'} //= $ref->hour |