Branch Coverage

blib/lib/Geo/TCX.pm
Criterion Covered Total %
branch 146 204 71.5


line true false branch
62 5 18 if (ref $first_arg eq 'SCALAR') { }
67 0 18 unless -f $fname
69 0 18 if ($fname =~ /(?i:\.fit$)/)
81 17 6 if $txt =~ s[(<Creator.*</Creator>)][]
86 23 0 if $txt =~ /(<.xml version[^>]*>)/
87 23 0 if $txt =~ m[(<TrainingCenterDatabase.*</TrainingCenterDatabase>)]
88 13 10 if $txt =~ m[(<Activities.*</Activities>)]
89 13 10 if $txt =~ m[(<Activity.*</Activity>)]
90 10 13 if $txt =~ m[(<Courses.*</Courses>)]
91 10 13 if $txt =~ m[(<Course(?!s).*</Course>)]
94 13 10 if ($o->{'tag_activity'})
95 13 0 if $o->{'tag_activity'} =~ m[<Activity.*<Id>(.*)</Id>]
96 13 0 if $o->{'tag_activity'} =~ /<Activity Sport="([^"]+)"/
100 10 13 if ($o->{'tag_course'})
102 10 0 if $o->{'tag_course'} =~ m[<Course.*<Name>(.*)</Name>]
105 17 6 if $txt =~ m[(<Author.*</Author>)]
106 17 6 if $o->{'tag_author'}
109 13 10 if ($o->{'tag_activity'})
115 32 13 if $i > 0
120 10 13 if ($o->{'tag_course'})
127 10 0 if ($xml_str =~ m[(<Lap>.*</Lap>)]s)
130 0 10 if (@lap_tags == 0)
135 10 0 if ($lap_tags[$i] =~ m[<EndPosition>(.*)</EndPosition>]s)
146 10 0 if ($xml_str =~ m[(<Track>.*</Track>)]s)
151 10 0 if (@lap_tags == 1) { }
155 0 0 if ($i < $#lap_tags) { }
167 0 10 if $i > 0
174 0 23 unless $n
175 12 11 $n > 1 ? :
203 0 2 if $clone->is_course
207 1 1 $opts{'lap'} ? :
212 2 2 if (defined $course) { }
235 0 6 if $@
253 0 53 if not $lap_i or @_
270 95 2 unless @_
294 0 1 if not $i2 or @_
295 0 1 unless $i2 - $i1 == 1
317 0 3 if not $pt_no or @_
336 0 1 if @_
338 1 0 unless ref $to_pt
393 0 5 unless $lap_i
434 5 4 if (ref $_[0] eq 'ARRAY') { }
443 6 3 if $o->is_course or $opts{'course'}
445 0 9 unless $fname
456 6 3 if ($as_course) { }
458 6 0 if (@laps_to_save == 1) { }
460 4 2 if (defined $opts{'course_name'}) { }
462 2 0 if ($o->is_course) { }
488 10 5 unless ($opts{'nosave'})
490 0 10 if -f $fname_lap and not $opts{'force'}
491 0 10 unless open my $fh, ">", $fname_lap
520 1 1 if ($opts{'filename'}) { }
522 0 2 unless $fname
523 0 2 if -f $fname and not $opts{'force'}
527 2 0 if ($o->is_course) { }
534 4 0 if ($lap->is_course) { }
538 4 0 if ($str_lap =~ s[\s*(<Lap>.*</Lap>)\s*(<Track>.*</Track>)\s*][]s) { }
548 2 0 if $str_course_tracks
550 2 0 if ($o->is_course) { }
555 0 2 unless open my $fh, ">", $fname
565 2 9 $opts{'indent'} ? :
566 2 9 $opts{'indent'} ? :
567 8 3 if $o->is_course or $opts{'course'}
582 11 0 if ($o->{'tag_trainingcenterdatabase'} =~ /(<TrainingCenterDatabase[^>]*>)/) { }
592 7 4 if ($o->{'tag_activities'})
593 7 0 if ($o->{'tag_activities'} =~ /(<Activities[^>]*>)/) { }
596 7 0 if ($o->{'tag_activity'} =~ /(<Activity[^>]*>)/) { }
601 4 7 if ($o->{'tag_courses'})
602 4 0 if ($o->{'tag_courses'} =~ /(<Courses[^>]*>)/) { }
605 4 0 if ($o->{'tag_course'} =~ /(<Course(?!s)[^>]*>)/) { }
610 4 7 if ($as_course and not $o->{'tag_courses'})
626 9 2 if $o->{'tag_creator'}
629 9 2 if $o->{'tag_author'}
649 32 28 unless $fname
650 0 28 if @_
652 10 18 if ($o->_is_wd_defined)
657 10 18 if ($wd)
658 8 2 unless ($fname =~ m[^/])
665 0 28 unless -d $o->{'_fileABSOLUTEPATH'}
688 0 83 if @_
691 44 39 if (not $dir) { }
692 28 16 unless $first_call
694 15 1 if ($fname) { }
700 0 39 if $dir =~ /^~/
701 5 34 if $dir eq "-"
703 8 31 if ($dir =~ m[^[^/]])
704 2 6 $first_call ? :
709 0 39 unless -d $dir
711 23 16 if ($first_call) { }
723 39 5 if $dir
757 2 4 if ($activity)
761 4 0 if $o->{'tag_activity'} =~ /<Activity Sport="([^"]*)"/
810 17 0 if ($o->{'tag_author'} =~ m[<Author\s+([^=]+="[^"]+")>(.*)<\/Author>])
815 64 4 if $author_xml =~ m[<$key>(.+)</$key>]
827 0 8 if defined $href->{'key'}
836 0 1 unless %keys_values or $href
837 2 1 if (%keys_values)
839 0 2 unless $possible_author_keys{$key}
851 6 60 if $lap_i < 0
853 0 66 unless $exists{$lap_i}
861 0 0 unless (defined $FitConvertPl)
864 0 0 if -f $FitConvertPl