Branch Coverage

blib/lib/Geo/TAF.pm
Criterion Covered Total %
branch 81 170 47.6


line true false branch
60 0 1 unless length $l > 10
61 1 0 unless $l =~ /^\s*(?:METAR|TAF)\s/i
69 0 1 unless length $l > 10
70 1 0 unless $l =~ /^\s*(?:METAR|TAF)\s/i
93 1 0 exists $$self{'chunks'} ? :
146 1 1 if ($t eq 'TAF') { }
1 0 elsif ($t eq 'METAR') { }
156 2 0 if ($t =~ /^[A-Z]{4}$/) { }
164 2 0 if (my($day, $time) = $t =~ /^(\d\d)(\d{4})Z?$/) { }
172 1 1 if ($$self{'taf'})
173 1 0 if (my($vd, $vfrom, $vto) = $tok[0] =~ /^(\d\d)(\d\d)(\d\d)$/)
183 1 1 $$self{'taf'} ? :
188 1 1 if $$self{'valid_day'}
195 3 18 if ($t eq 'TEMPO' or $t eq 'BECMG') { }
0 18 elsif ($ignore{$t}) { }
0 18 elsif ($t eq 'NOSIG' or $t eq 'NSW') { }
0 18 elsif ($t eq 'BKN') { }
0 18 elsif ($clt{$t}) { }
0 18 elsif ($t eq 'CAVOK') { }
0 18 elsif ($t eq 'RMK') { }
0 18 elsif (my($time) = $t =~ /^FM(\d\d\d\d)$/) { }
0 18 elsif (($time) = $t =~ /^TL(\d\d\d\d)$/) { }
1 17 elsif (my($percent) = $t =~ /^PROB(\d\d)$/) { }
0 17 elsif (my($sort, $dir) = $t =~ /^(RWY?|LDG)(\d\d[RLC]?)$/) { }
3 14 elsif (my($wdir, $spd, $gust, $unit) = $t =~ /^(\d\d\d|VRB)(\d\d)(?:G(\d\d))?(KT|MPH|MPS|KMH)$/) { }
1 13 elsif (my($u, $p, $punit) = $t =~ /^([QA])(?:NH)?(\d\d\d\d)(INS?)?$/) { }
4 9 elsif (my($viz, $mist) = $t =~ /^(\d\d\d\d[NSEW]{0,2})([A-Z][A-Z])?$/) { }
0 9 elsif (($viz) = $t =~ /^(\d+)KM$/) { }
0 9 elsif (my($m) = $t =~ /^(\d)$/) { }
0 9 elsif (my($lt, $mviz) = $t =~ m[^(M)?(\d+(:?/\d)?)SM$]) { }
0 9 elsif (my($rw, $rlt, $range, $vlt, $var, $runit, $tend) = $t =~ m[^R(\d\d[LRC]?)/([MP])?(\d\d\d\d)(?:V([MP])(\d\d\d\d))?(?:(FT)/?)?([UND])?$]) { }
3 6 elsif (my($deg, $w) = $t =~ /^(\+|\-|VC)?([A-Z][A-Z]{1,4})$/) { }
5 1 elsif (my($amt, $height, $cb) = $t =~ m[^(FEW|SCT|BKN|OVC|SKC|CLR|VV|///)(\d\d\d|///)(CB|TCU)?$]) { }
1 0 elsif (my($ms, $t, $n, $d) = $t =~ m[^(M)?(\d\d)/(M)?(\d\d)?$]) { }
199 3 0 if (@tok and ($from, $to) = $tok[0] =~ /^(\d\d)(\d\d)$/)
200 3 0 if ($$self{'taf'} and $from >= 0 and $from <= 24 and $to >= 0 and $to <= 24) { }
250 0 1 if (@tok and ($from, $to) = $tok[0] =~ /^(\d\d)(\d\d)$/)
251 0 0 if ($$self{'taf'} and $from >= 0 and $from <= 24 and $to >= 0 and $to <= 24) { }
271 0 3 if (@tok and ($fromdir, $todir) = $tok[0] =~ /^(\d\d\d)V(\d\d\d)$/)
278 0 3 if defined $gust
280 0 3 if $unit eq 'Mps'
291 0 1 if ($u eq 'A' or $punit and $punit =~ /^I/) { }
303 1 3 $viz eq '9999' ? :
307 0 4 if $mist
311 0 0 $viz eq '9999' ? :
319 0 0 if (@tok and ($viz) = $tok[0] =~ m[^(\d/\d)SM$])
329 0 0 if $lt
337 0 0 unless $runit
339 0 0 if $rlt and $rlt eq 'M'
340 0 0 if $rlt and $rlt eq 'P'
341 0 0 if $vlt and $vlt eq 'M'
342 0 0 if $vlt and $vlt eq 'P'
351 1 4 $height eq '///' ? :
5 0 unless $amt eq '///' and $height eq '///'
357 0 1 if defined $ms
358 1 0 if defined $d and defined $n
388 0 8 if $name eq 'DESTROY'
412 37 12 defined $_ ? :
419 0 0 defined $_ ? :
425 1 0 ref $pkg ? :
426 1 0 if ($d =~ /1$/) { }
0 0 elsif ($d =~ /2$/) { }
0 0 elsif ($d =~ /3$/) { }
467 0 1 $$self[0] eq 'VRB' ? :
468 0 1 if defined $$self[4]
469 0 1 $$self[0] eq 'VRB' ? :
470 0 1 if defined $$self[2]
495 1 0 if defined $$self[1]
529 0 2 if @$self == 1
530 0 2 if $$self[0] eq 'VV'
531 0 2 defined $$self[2] ? :
597 1 2 if (not defined $t) { }
0 2 elsif ($t eq 'VC') { }
1 1 elsif ($t eq 'SH') { }
0 2 elsif ($t eq '+' and $$self[0] eq 'FC') { }
613 1 0 if (@out and $shower)
618 0 1 if $vic
631 0 0 if defined $$self[2]
632 0 0 if (defined $$self[4])
633 0 0 if $$self[4] eq 'D'
634 0 0 if $$self[4] eq 'U'
646 0 0 $$self[0] eq 'LDG' ? :
660 0 0 if defined $$self[1]
672 0 0 if defined $$self[0]
685 0 0 if defined $$self[0]