Branch Coverage

blib/lib/Geo/TCX/Trackpoint.pm
Criterion Covered Total %
branch 83 124 66.9


line true false branch
63 0 3563 if @_
72 0 7126 unless $1 eq $3
73 0 7126 unless $Geo::TCX::Trackpoint::possible_attr{$1}
94 0 98 if $@
124 37 64 unless $attr =~ /[^A-Z]/
125 0 64 unless $Geo::TCX::Trackpoint::possible_attr{$attr}
126 6 58 if @_
147 1 0 if defined $pt->AltitudeMeters
148 1 0 if defined $pt->Time
164 0 1 if @_
180 0 3 if @_
200 0 14 if @_ or not $to->isa("Geo::TCX::Trackpoint")
220 0 0 $opts{'indent'} ? :
221 0 0 $opts{'indent'} ? :
222 0 0 $opts{'n_tabs'} ? :
244 0 0 if @_
279 3450 86 if (ref $previous_pt)
280 0 3450 unless $previous_pt->isa("Geo::TCX::Trackpoint")
282 0 3536 if @_
286 3536 0 if ($chomped_str =~ m[\s*^\<Trackpoint\>(.*)\</Trackpoint\>\s*$]gs)
293 3535 1 if ($chomped_str =~ s[(<Position>.*</Position>)][]g) { }
309 0 13350 unless $1 eq $3
310 0 13350 unless $Geo::TCX::Trackpoint::Full::possible_attr{$1}
315 0 3536 unless defined $pt->{'Time'}
316 0 3536 unless defined $pt->{'DistanceMeters'}
317 0 3536 if ($pt->{'_noTime'} or $pt->{'_noDist'})
322 3536 0 unless $pt->{'_noDist'}
323 3536 0 unless ($pt->{'_noTime'})
325 3536 0 unless $pt->{'_noTime'}
327 0 3536 if $orig_time_string ne $pt->{'_time_iso8601'}
336 7906 21069 unless $attr =~ /[^A-Z]/
337 0 21069 unless $Geo::TCX::Trackpoint::Full::possible_attr{$attr}
338 0 21069 if @_
359 2 1055 if (defined $value)
360 0 2 unless $opts{'force'}
433 63 373 if (ref $_[0] and $_[0]->isa('DateTime::Duration')) { }
444 63 360 if (ref $_[0] and $_[0]->isa('DateTime::Duration')) { }
480 53 4269 if (defined $value)
481 0 53 unless $opts{'force'}
505 2 3 if (ref $_[0]) { }
1 2 elsif ($_[0] =~ /^(\d+)$/) { }
506 0 2 if ($_[0]->isa('DateTime')) { }
509 0 2 unless $_[0]->isa("Geo::TCX::Trackpoint")
528 397 841 $opts{'indent'} ? :
529 397 841 $opts{'indent'} ? :
530 1238 0 $opts{'n_tabs'} ? :
535 1237 1 if (defined $pt->LatitudeDegrees)
543 1023 215 if (defined $pt->HeartRateBpm)
546 0 1238 if (defined $pt->Cadence)
549 0 1238 if (defined $pt->SensorState)
560 3450 88 if ref $_[-1] and $_[-1]->isa("Geo::TCX::Trackpoint")
576 3496 88 if (ref $previous_pt)
577 0 3496 unless $previous_pt->isa("Geo::TCX::Trackpoint")
593 3496 947 if ref $_[-1] and $_[-1]->isa("Geo::TCX::Trackpoint")
596 905 3538 if (ref $time and $time->isa('DateTime')) { }
608 3584 859 unless (exists $pt->{'_time_elapsed'})
609 3496 88 if ($previous_pt) { }
620 4443 8886 if ($opts{'local'}) { }
635 3496 1632 if ref $_[-1] and $_[-1]->isa("Geo::TCX::Trackpoint")
639 5128 0 if defined $meters
643 3584 1544 unless (exists $pt->{'_distance_elapsed'})
644 3496 88 if ($previous_pt) { }