line |
!l |
l&&!r |
l&&r |
condition |
3
|
2 |
0 |
0 |
@ARGV and @ARGV[0] =~ /^\w/ |
94
|
0 |
0 |
0 |
@_ and -f $_[0] |
123
|
10 |
0 |
2 |
&blessed($val) and $val->can('ymd') |
189
|
2 |
0 |
0 |
$self->config('hours_per_month') and $res->{'interval'} eq 'month' |
203
|
1 |
0 |
1 |
$start and $stop |
227
|
0 |
0 |
2 |
$event->{'project'} and $event->{'start'} |
308
|
0 |
0 |
0 |
$k eq 'stop' and $event->{$k} |
402
|
3 |
0 |
5 |
-r $previous && 'App::tt::file'->new($previous->slurp) |
403
|
3 |
1 |
4 |
$trc_file and -r $trc_file |
406
|
2 |
0 |
2 |
$trc_file and -r $trc_file |
466
|
0 |
0 |
0 |
$res->{'start_at'} = $1 and $res->{'interval'} = $2 |
488
|
0 |
4 |
0 |
@project_re and not grep({$event->{'project'} =~ /$_/;} @project_re) |
489
|
4 |
0 |
0 |
$tags and not grep({$tags =~ /\b$_\b/;} @{$$event{'tags'};}) |
498
|
2 |
2 |
0 |
@{$res->{'log'};} and not $res->{'log'}[-1]{'project'} |
|
4 |
0 |
0 |
@{$res->{'log'};} and not $res->{'log'}[-1]{'project'} and $res->{'log'}[-1]{'start'}->mday == $event->{'start'}->mday |
514
|
0 |
0 |
0 |
$self->month and not $self->year |
528
|
0 |
0 |
0 |
-t STDIN and $self->year || $self->month |
542
|
0 |
0 |
0 |
$code and $self->$code($event) |
553
|
0 |
0 |
2 |
$event->{'stop'} && $event->{'start'} && $event->{'stop'} - $event->{'start'} |
556
|
2 |
2 |
0 |
$event->{'stop'} and $event->{'seconds'} < $self->config('min_time') |
616
|
22 |
0 |
6 |
not $hms and $ymd =~ /:/ |
617
|
6 |
22 |
0 |
$ymd and not $ymd =~ /^[\d-]+$/ |
618
|
0 |
28 |
0 |
$hms and not $hms =~ /^[\d:]+$/ |
659
|
0 |
0 |
0 |
$start->day_of_week != 0 and $start->day_of_week != 6 |
line |
l |
!l |
condition |
67
|
0 |
2 |
$ENV{'APP_TT_DEBUG'} || 0 |
122
|
12 |
0 |
$event->{$_} // '' |
142
|
1 |
0 |
shift() || 'app' |
174
|
2 |
0 |
$event->{'project'} || '---' |
290
|
0 |
1 |
$ENV{'EDITOR'} || 'nano' |
|
1 |
0 |
$ENV{'TT_COLUMNS'} || 'date,project,hours,rounded,tags,description' |
|
0 |
1 |
$ENV{'TT_HOURS_PER_MONTH'} || 0 |
|
0 |
1 |
$ENV{'TT_MIN_TIME'} || 300 |
|
0 |
1 |
$ENV{'TT_ROUND_UP_AT'} || 30 |
|
0 |
1 |
$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} |
294
|
11 |
0 |
($self->{'config'}{$key} // $self->{'defaults'}{$key}) // die("Missing option '${key}'.\n") |
301
|
0 |
0 |
$event->{'path'} //= 'Not found' |
309
|
0 |
0 |
$event->{$k} // '' |
326
|
0 |
0 |
unlink $trc_file or die "rm ${trc_file}: $!" |
337
|
4 |
3 |
$event->{'__CLASS__'} ||= 'App::TimeTracker::Data::Task' |
339
|
0 |
7 |
$event->{'seconds'} ||= 0 |
340
|
4 |
3 |
$event->{'user'} ||= scalar getpwuid $< |
341
|
4 |
3 |
$event->{'tags'} ||= [$self->_tags] |
342
|
0 |
7 |
$self->description // '' |
359
|
36 |
0 |
$row->[$col] //= '' |
361
|
18 |
18 |
$spec[$col] // 0 |
364
|
4 |
4 |
$width // 0 |
376
|
22 |
0 |
$self->{'stdout'} ||= \*STDOUT |
378
|
4 |
0 |
$self->{'stderr'} ||= \*STDERR |
418
|
0 |
0 |
$log{$k} ||= {%$e, 'seconds', 0} |
461
|
0 |
4 |
$self->project || '.+' |
469
|
0 |
0 |
$res->{'fill'} ||= 1 |
472
|
0 |
4 |
$res->{'fill'} ||= 0 |
473
|
0 |
4 |
$res->{'interval'} ||= 'month' |
474
|
0 |
4 |
$res->{'start_at'} ||= 0 |
504
|
0 |
4 |
$self->group_by || 'nothing' |
520
|
0 |
0 |
$self->year || '\\d{4}' |
521
|
0 |
0 |
$self->month || '\\d{2}' |
523
|
0 |
0 |
$self->project || '[^.]+' |
543
|
0 |
0 |
unlink $info{'file'} or die "rm $info{'file'}: $!" |
607
|
0 |
0 |
$! || 1 |
line |
l |
!l&&r |
!l&&!r |
condition |
23
|
35 |
9 |
0 |
ref $class || $class |
88
|
1 |
1 |
0 |
$ENV{'TT_HOME'} || $ENV{'TIMETRACKER_HOME'} || ($ENV{'HOME'}, '.TimeTracker') |
|
26 |
4 |
0 |
+(shift())->{'home'} //= 'App::tt::file'->new($ENV{'TT_HOME'} || $ENV{'TIMETRACKER_HOME'} || ($ENV{'HOME'}, '.TimeTracker')) |
95
|
0 |
0 |
0 |
$self->year or $self->month |
|
0 |
0 |
0 |
$self->year or $self->month or not -t STDIN |
294
|
0 |
9 |
2 |
$self->{'config'}{$key} // $self->{'defaults'}{$key} |
308
|
0 |
0 |
0 |
$k eq 'start' or $k eq 'stop' and $event->{$k} |
334
|
0 |
0 |
0 |
$project ||= 'App::tt::file'->new->basename |
335
|
7 |
0 |
0 |
$project ||= $self->config('project') |
338
|
5 |
2 |
0 |
$event->{'project'} ||= $project |
342
|
0 |
0 |
7 |
$event->{'description'} ||= $self->description // '' |
378
|
2 |
2 |
8 |
$1 eq '2' or $2 eq '!' |
467
|
0 |
0 |
0 |
$res->{'start_at'} ||= $1 |
468
|
0 |
0 |
0 |
$res->{'interval'} ||= $1 |
490
|
4 |
0 |
0 |
$event->{'stop'} ||= $NOW + $NOW->tzoffset |
491
|
4 |
0 |
0 |
$event->{'seconds'} ||= $event->{'stop'} - $event->{'start'} |
528
|
0 |
0 |
0 |
$self->year || $self->month |
585
|
1 |
2 |
2 |
not $event->{'start'} or $event->{'stop'} |
627
|
1 |
33 |
0 |
$t{'ref'} || $NOW |
629
|
19 |
15 |
0 |
$t{'Y'} ||= $ref->year |
630
|
24 |
10 |
0 |
$t{'m'} //= $ref->mon |
631
|
26 |
8 |
0 |
$t{'d'} //= $ref->mday |
632
|
5 |
0 |
6 |
defined $t{'H'} || defined $t{'M'} |
|
23 |
6 |
5 |
$t{'S'} //= defined $t{'H'} || defined $t{'M'} ? 0 : $ref->second |
633
|
25 |
6 |
3 |
$t{'M'} //= defined $t{'H'} ? 0 : $ref->min |
634
|
28 |
0 |
6 |
$t{'H'} //= $ref->hour |