Branch Coverage

blib/lib/Geo/TCX/Lap.pm
Criterion Covered Total %
branch 85 140 60.7


line true false branch
73 32 23 if (ref $last_point_previous_lap)
74 0 32 unless $last_point_previous_lap->isa("Geo::TCX::Trackpoint")
80 45 10 if ($str =~ m[\<Lap StartTime="(.*?)"\>(.*?)\</Lap\>]s) { }
10 0 elsif ($str =~ m[\<Lap\>(.*?)\</Lap\>(.*)]s) { }
84 45 0 if ($metrics_and_track =~ m[(.*?)(\<Track\>.*\</Track\>)]s)
93 0 55 unless $track_str
100 45 10 if ($type eq "Activity")
116 10 45 if ($type eq "Course")
124 10 0 if ($metrics =~ s[\<BeginPosition\>(.*)\</BeginPosition\>][]g)
127 10 0 if ($metrics =~ s[\<EndPosition\>(.*)\</EndPosition\>][]g)
138 0 10 if ($meters > 0)
174 0 2 unless $y->isa("Geo::TCX::Lap")
182 1 1 if ($opts{'as_is'}) { }
189 2 0 if ($m->is_activity) { }
193 2 0 if (defined $m->MaximumSpeed)
194 2 0 if (defined $y->MaximumSpeed) { }
195 2 0 $m->MaximumSpeed > $y->MaximumSpeed ? :
198 2 0 if (defined $m->MaximumHeartRateBpm)
199 2 0 if (defined $y->MaximumHeartRateBpm) { }
200 2 0 $m->MaximumHeartRateBpm > $y->MaximumHeartRateBpm ? :
205 2 0 if (defined $m->AverageHeartRateBpm)
206 2 0 if (defined $y->AverageHeartRateBpm) { }
210 0 2 if (defined $m->Cadence)
211 0 0 if (defined $y->Cadence) { }
217 2 0 if (defined $m->Calories)
218 2 0 if (defined $y->Calories) { }
255 0 5 unless wantarray
258 5 0 if ($lap->is_activity) { }
261 10 0 if defined $l->MaximumSpeed
262 10 0 if defined $l->MaximumHeartRateBpm
263 10 0 if defined $l->AverageHeartRateBpm
264 0 10 if defined $l->Cadence
271 10 0 if defined $l->Calories
304 0 1 unless $l->is_course
344 114 329 unless $attr =~ /[^A-Z]/
345 0 329 unless $Geo::TCX::Lap::possible_attr{$attr}
346 0 329 if @_
364 20 1 (shift())->StartTime ? :
365 14 18 (shift())->StartTime ? :
386 6 0 if ($l->is_activity)
400 6 0 if ($l->is_activity)
439 0 11 if @_
449 0 67 if @_
459 0 10 if @_
463 75 394 if $speed > $max_speed
470 0 10 if @_
471 0 10 unless $l->MaximumHeartRateBpm
475 101 368 if $hr > $max_hr
482 0 10 if @_
483 0 10 unless $l->AverageHeartRateBpm
494 0 0 if @_
495 0 0 unless $l->Cadence
518 11 9 if $opts{'course'} or $l->is_course
520 5 15 $opts{'indent'} ? :
521 5 15 $opts{'indent'} ? :
523 11 9 if ($as_course) { }
530 20 0 if $l->{'TotalTimeSeconds'}
531 20 0 if $l->{'DistanceMeters'}
533 11 9 if ($as_course) { }
535 7 4 if ($l->is_course) { }
554 11 0 if $l->{'Intensity'}
557 9 0 if $l->{'MaximumSpeed'}
558 9 0 if $l->{'Calories'}
559 9 0 if $l->{'AverageHeartRateBpm'}
560 9 0 if $l->{'MaximumHeartRateBpm'}
561 9 0 if $l->{'Intensity'}
562 0 9 if $l->{'Cadence'}
563 9 0 if $l->{'TriggerMethod'}
566 11 9 $as_course ? :
570 9 11 unless ($as_course)