line |
true |
false |
branch |
3
|
0 |
1 |
if (@ARGV and @ARGV[0] =~ /^\w/) |
4
|
0 |
0 |
/^-{1,2}h\w{0,3}$/ ? : |
42
|
0 |
0 |
if @_ and -f $_[0] |
43
|
0 |
0 |
if $self->year or $self->month or not -t STDIN |
63
|
0 |
0 |
$event->{'minutes'} >= $self->config('round_up_at') ? : |
71
|
0 |
0 |
if &blessed($val) and $val->can('ymd') |
72
|
0 |
0 |
if ref $val eq 'ARRAY' |
94
|
0 |
0 |
if ($for eq 'app') |
100
|
0 |
0 |
unless open my $POD, '<', $INC{'App/tt.pm'} |
103
|
0 |
0 |
if /^=head2 $for/ ... /^=(head|cut)/ |
110
|
0 |
0 |
unless @help |
147
|
0 |
0 |
unless $start and $stop and $self->project |
163
|
0 |
0 |
if (-e $trc_file) |
168
|
0 |
0 |
if $self->_save(\%event) |
181
|
0 |
0 |
if -d '.git' |
183
|
0 |
0 |
unless $event->{'project'} |
186
|
0 |
0 |
unless $self->_save($event) |
196
|
0 |
0 |
if $exit_code == 3 |
205
|
0 |
0 |
if (not $event->{'start'}) { } |
|
0 |
0 |
elsif ($event->{'stop'}) { } |
225
|
0 |
0 |
unless ($self->{'config'}) |
228
|
0 |
0 |
unless -r $path |
229
|
0 |
0 |
unless open my $CONFIG, '<', $path |
231
|
0 |
0 |
unless $line =~ /^(?:TT_)?(\w+)=(\S+)/ |
252
|
0 |
0 |
$trc_file ? : |
255
|
0 |
0 |
unless $event->{'start'} |
260
|
0 |
0 |
unless $event->{$k} |
|
0 |
0 |
if $k eq 'tags' |
261
|
0 |
0 |
if $k eq 'start' or $k eq 'stop' and $event->{$k} |
270
|
0 |
0 |
unless my($k, $v) = /^(\w+)\s*:\s*(.+)/ |
271
|
0 |
0 |
if $k eq 'tags' |
272
|
0 |
0 |
if $k eq 'start' |
273
|
0 |
0 |
if $k eq 'stop' |
277
|
0 |
0 |
unless $self->_save($event) |
278
|
0 |
0 |
if $prev |
279
|
0 |
0 |
unless $trc_file eq $event->{'path'} |
308
|
0 |
0 |
unless -r $previous |
310
|
0 |
0 |
-r $trc_file ? : |
329
|
0 |
0 |
if $pl < length $p |
339
|
0 |
0 |
ref $duration ? : |
347
|
0 |
0 |
unless $sep |
348
|
0 |
0 |
if $sep eq 'hm' |
356
|
0 |
0 |
unless $trc->{'tags'} |
369
|
0 |
0 |
if /^(-\d+)(m|y|month|year)$/ |
370
|
0 |
0 |
if /^(-\d+)$/ |
371
|
0 |
0 |
if /^(month|year)/ |
372
|
0 |
0 |
if /^--fill/ |
379
|
0 |
0 |
if ($res->{'interval'} =~ /^y/) { } |
391
|
0 |
0 |
unless my($date, $hms, $project) = /^(\d+)-(\d+)_(.*)\.trc$/ |
393
|
0 |
0 |
if @project_re and not grep({$event->{'project'} =~ /$_/;} @project_re) |
394
|
0 |
0 |
if $tags and not grep({$tags =~ /\b$_\b/;} @{$$event{'tags'};}) |
400
|
0 |
0 |
@{$res->{'log'};} ? : |
|
0 |
0 |
if $res->{'fill'} |
404
|
0 |
0 |
if @{$res->{'log'};} and not $res->{'log'}[-1]{'project'} and $res->{'log'}[-1]{'start'}->mday == $event->{'start'}->mday |
407
|
0 |
0 |
if $res->{'max_project_chr'} < length $event->{'project'} |
412
|
0 |
0 |
if -d $res->{'path'} |
414
|
0 |
0 |
if (my $method = $self->can(sprintf('_group_by_%s', $self->group_by || 'nothing'))) |
423
|
0 |
0 |
unless $self->config('hours_per_month') and $res->{'interval'} eq 'month' |
430
|
0 |
0 |
if ($start->day_of_week != 0 and $start->day_of_week != 6) |
431
|
0 |
0 |
if $start < $NOW |
437
|
0 |
0 |
$NOW->hour > 12 ? : |
441
|
0 |
0 |
$remaining_days > 0 ? : |
|
0 |
0 |
$remaining_days <= 0 ? : |
452
|
0 |
0 |
if $self->{'root'} |
465
|
0 |
0 |
if $self->month and not $self->year |
467
|
0 |
0 |
if $self->year |
468
|
0 |
0 |
if $self->month |
479
|
0 |
0 |
unless (-t STDIN and $self->year || $self->month) |
481
|
0 |
0 |
unless $code =~ /^\s*sub\b/s |
482
|
0 |
0 |
unless $code = eval "use 5.10.1;use strict;use warnings;$code" |
491
|
0 |
0 |
unless $_ =~ /^$re$/ |
501
|
0 |
0 |
unless $code |
504
|
0 |
0 |
if $code and $self->$code($event) |
505
|
0 |
0 |
unless $found->{'file'} eq $event->{'path'} |
518
|
0 |
0 |
unless $event->{'tags'} |
521
|
0 |
0 |
if (my $duration = $event->{'stop'} && $event->{'start'} && $event->{'stop'} - $event->{'start'}) |
524
|
0 |
0 |
if ($event->{'stop'} and $event->{'seconds'} < $self->config('min_time')) |
532
|
0 |
0 |
if $event->{'start'} |
533
|
0 |
0 |
if $event->{'stop'} |
537
|
0 |
0 |
unless -d dirname($event->{'path'}) |
544
|
0 |
0 |
if @_ |
545
|
0 |
0 |
unless $self->tag |
551
|
0 |
0 |
unless open my $file, '<', $path |
561
|
0 |
0 |
unless open my $file, '>', $path |
562
|
0 |
0 |
unless defined $file->syswrite($content) |
570
|
0 |
0 |
if not $event->{'start'} or $event->{'stop'} |
575
|
0 |
0 |
if ($duration->seconds < $self->config('min_time')) |
579
|
0 |
0 |
unless unlink $event->{'path'} |
583
|
0 |
0 |
if ($self->_save($event)) |
594
|
7 |
0 |
@_ == 1 ? : |
596
|
7 |
0 |
if ($t{'str'}) |
598
|
2 |
5 |
if not $hms and $ymd =~ /:/ |
599
|
2 |
5 |
if $ymd =~ s/(\d{4})// |
600
|
3 |
4 |
if $ymd =~ s/0?(\d{1,2})-(\d+)/$2/ |
601
|
5 |
2 |
if $ymd =~ s/0?(\d{1,2})// |
602
|
7 |
0 |
if $hms =~ s/0?(\d{1,2})// |
603
|
4 |
3 |
if $hms =~ s/0?(\d{1,2})// |
604
|
3 |
4 |
if $hms =~ s/0?(\d{1,2})// |
608
|
0 |
7 |
unless ref $ref |
612
|
4 |
0 |
defined $t{'H'} || defined $t{'M'} ? : |
613
|
3 |
0 |
defined $t{'H'} ? : |
616
|
0 |
7 |
if $t{'m'} <= 0 |
617
|
0 |
7 |
if $t{'m'} > 12 |
622
|
1 |
6 |
unless (eval {
do {
$t{'iso'} = sprintf('%s-%02s-%02sT%02s:%02s:%02s', @t{'Y', 'm', 'd', 'H', 'M', 'S'});
$t{'tp'} = 'Time::Piece'->strptime("$t{'iso'}+0000", '%Y-%m-%dT%H:%M:%S%z')
}
}) |
625
|
1 |
0 |
if $t{'str'} |