Branch Coverage

blib/lib/App/JobLog/Log/Line.pm
Criterion Covered Total %
branch 52 74 70.2


line true false branch
46 73 495 if (exists $opts{'comment'}) { }
1 494 elsif (exists $opts{'done'}) { }
493 1 elsif (exists $opts{'time'}) { }
0 1 elsif (exists $opts{'text'}) { }
49 0 73 if keys %opts
53 0 1 if $time and ref $time ne 'DateTime'
59 0 1 if keys %opts
63 0 493 if $time and ref $time ne 'DateTime'
67 0 493 if defined $tags and ref $tags ne 'ARRAY'
69 486 7 unless ($tags)
75 1 492 if (my $type = ref $description) { }
401 91 elsif (defined $description) { }
76 0 1 unless $type eq 'ARRAY'
93 0 493 if keys %opts
96 0 0 if $opts{'text'} =~ /\S/u
99 0 0 if keys %opts
108 4271 24474 if ($text =~ /^\s*(?:#\s*+(.*?)\s*)?$/u)
109 4124 147 if (defined $1)
116 24470 4 if ($text =~ / ^ (?&ts) (?&non_ts) $ (?(DEFINE) (? (\d{4}\s++\d++\s++\d++\s++\d++\s++\d++\s++\d++) (?{ $date = $^N; }) ) (? (?¬e) | (?&duration_mark) ) (? : (?: (?&done) | (?&event) ) ) (? DONE ) (? (?&event) (?{ $is_note = 1; }) ) (? (?&tags) : (?&descriptions) (?{ $is_beginning = 1; }) ) (? (?:(?&tag)(\s++(?&tag))*+)?) (? ((?:[^\s:\\]|(?&escaped))++) (?{ push @tags, $^N; })) (? \\.) (? (?: (?&description) (?: ; \s*+ (?&description) )*+ )? ) (? ((?:[^;\\]|(?&escaped))++) (?{ push @description, $^N; })) ) /u) { }
131 20363 4107 if ($is_beginning) { }
143 203 20160 if $is_note
160 0 1085 if ($self->is_malformed) { }
1085 0 elsif ($self->is_event) { }
166 1085 0 if ($self->is_beginning)
167 0 1085 if $self->is_note
173 0 0 if $self->is_comment
174 0 0 if exists $self->{'text'}
182 1 495 if exists $self->{'text'}
183 412 83 if ($self->is_event) { }
82 1 elsif ($self->is_comment) { }
185 68 344 $self->is_note ? :
186 410 2 if ($self->is_beginning) { }
260 13668 3329 if $_[0]{'time'}
287 0 436 unless $self->tags
290 1 6 unless $tags{$tag}
298 0 2 unless $self->tags
301 1 1 if $tags{$tag}