Branch Coverage

blib/lib/JSCalendar/Duration.pm
Criterion Covered Total %
branch 46 54 85.1


line true false branch
15 0 27 if @_
18 0 27 unless defined $input
22 2 25 if $input eq "P0D"
28 1 24 if ($toparse =~ /\P{ASCII}/)
32 0 24 unless ($toparse =~ s/^P//)
36 1 23 if ($toparse =~ s/^(\d+)W\z//)
42 8 15 if ($toparse =~ s/^(\d+)D//)
46 3 20 unless $toparse
48 0 20 unless ($toparse =~ s/^T//)
52 4 16 if ($toparse =~ s/^(\d+)H//)
56 7 13 if ($toparse =~ s/^(\d+)M//)
60 18 2 if ($toparse =~ s/^(\d+(?:\.\d+)?)S//)
64 0 20 if ($toparse)
74 0 26 if @_
77 0 26 unless defined $input
84 9 17 if $toparse =~ s/\.(\d+)$//
89 0 26 if ($toparse and not $toparse =~ /^\d+$/)
102 1 8 if ($days and $days % 7 == 0 and $toparse == 0)
106 8 17 if $days
115 4 21 if $hours
124 7 18 if $minutes
133 16 9 if $seconds
135 7 18 if ($dec) { }
11 7 elsif ($seconds) { }
136 5 2 $durtime ? :
142 2 23 unless $durday or $durtime
144 20 3 if $durtime