Branch Coverage

blib/lib/Geo/Converter/dms2dd.pm
Criterion Covered Total %
branch 52 58 89.6


line true false branch
58 1 29 unless defined $value
62 2 27 unless ($value =~ / \A [\s0-9NEWSnews+-] /msx)
66 2 27 if defined $first_char_invalid
72 3 24 if $Geo::Converter::dms2dd::EVAL_ERROR
79 2 22 if $Geo::Converter::dms2dd::EVAL_ERROR
82 11 11 if ($hemi =~ / ^\s* [SsWw-] /msx)
105 3 19 if $Geo::Converter::dms2dd::EVAL_ERROR
127 0 27 if (not defined $deg) { }
1 26 elsif (scalar @nums > $MAX_DMS_NUM_COUNT) { }
134 22 5 if (defined $sec)
135 1 21 if (not $min =~ / \A $RE_INT \z/msx) { }
0 21 elsif ($sec < 0 or $sec > 60) { }
143 25 2 if (defined $min)
144 1 24 if (not $deg =~ / \A $RE_INT \z/msx) { }
0 24 elsif ($min < 0 or $min > 60) { }
158 3 24 if $msg
161 24 0 wantarray ? :
178 10 12 if ($is_lat // $hemi =~ / ^[SsNn] /msx) { }
8 4 elsif ($is_lon // $hemi =~ / [EeWw] /msx) { }
0 4 elsif ($dd < $MIN_VALID_DD or $dd > $MAX_VALID_DD) { }
179 1 9 if ($is_lon) { }
1 8 elsif (abs $dd > $MAX_VALID_LAT) { }
187 0 8 if ($is_lat) { }
1 7 elsif (abs $dd > $MAX_VALID_LON) { }
197 3 19 if $msg
209 14 10 if ($value =~ / \A ( $RE_HEMI | [-] )/msx)
213 11 13 if ($value =~ / ( $RE_HEMI ) \z /msx)
216 2 9 if defined $hemi and defined $hemi_end
221 1 21 unless (defined $hemi)