Branch Coverage

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


line true false branch
63 0 4010 if @_
72 0 8020 unless $1 eq $3
73 0 8020 unless $Geo::TCX::Trackpoint::possible_attr{$1}
94 0 98 if $@
124 40 66 unless $attr =~ /[^A-Z]/
125 0 66 unless $Geo::TCX::Trackpoint::possible_attr{$attr}
126 6 60 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 15 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 3887 93 if (ref $previous_pt)
280 0 3887 unless $previous_pt->isa("Geo::TCX::Trackpoint")
282 0 3980 if @_
286 3980 0 if ($chomped_str =~ m[\s*^\<Trackpoint\>(.*)\</Trackpoint\>\s*$]gs)
293 3979 1 if ($chomped_str =~ s[(<Position>.*</Position>)][]g) { }
309 0 15032 unless $1 eq $3
310 0 15032 unless $Geo::TCX::Trackpoint::Full::possible_attr{$1}
315 0 3980 unless defined $pt->{'Time'}
316 0 3980 unless defined $pt->{'DistanceMeters'}
317 0 3980 if ($pt->{'_noTime'} or $pt->{'_noDist'})
322 3980 0 unless $pt->{'_noDist'}
323 3980 0 unless ($pt->{'_noTime'})
325 3980 0 unless $pt->{'_noTime'}
327 0 3980 if $orig_time_string ne $pt->{'_time_iso8601'}
336 8350 11217 unless $attr =~ /[^A-Z]/
337 0 11217 unless $Geo::TCX::Trackpoint::Full::possible_attr{$attr}
338 0 11217 if @_
371 2 1055 if (defined $value)
372 0 2 unless $opts{'force'}
445 63 373 if (ref $_[0] and $_[0]->isa('DateTime::Duration')) { }
456 63 360 if (ref $_[0] and $_[0]->isa('DateTime::Duration')) { }
492 58 4666 if (defined $value)
493 0 58 unless $opts{'force'}
517 2 3 if (ref $_[0]) { }
1 2 elsif ($_[0] =~ /^(\d+)$/) { }
518 0 2 if ($_[0]->isa('DateTime')) { }
521 0 2 unless $_[0]->isa("Geo::TCX::Trackpoint")
540 397 841 $opts{'indent'} ? :
541 397 841 $opts{'indent'} ? :
542 1238 0 $opts{'n_tabs'} ? :
547 1237 1 if (defined $pt->LatitudeDegrees)
555 1023 215 if (defined $pt->HeartRateBpm)
558 0 1238 if (defined $pt->Cadence)
561 0 1238 if (defined $pt->SensorState)
572 3887 95 if ref $_[-1] and $_[-1]->isa("Geo::TCX::Trackpoint")
588 3933 95 if (ref $previous_pt)
589 0 3933 unless $previous_pt->isa("Geo::TCX::Trackpoint")
605 3933 954 if ref $_[-1] and $_[-1]->isa("Geo::TCX::Trackpoint")
608 905 3982 if (ref $time and $time->isa('DateTime')) { }
620 4028 859 unless (exists $pt->{'_time_elapsed'})
621 3933 95 if ($previous_pt) { }
632 4887 9774 if ($opts{'local'}) { }
647 3933 1639 if ref $_[-1] and $_[-1]->isa("Geo::TCX::Trackpoint")
651 5572 0 if defined $meters
655 4028 1544 unless (exists $pt->{'_distance_elapsed'})
656 3933 95 if ($previous_pt) { }