Branch Coverage

blib/lib/Geo/WeatherNOAA.pm
Criterion Covered Total %
branch 64 116 55.1


line true false branch
77 0 2 if ($in =~ /Error/)
116 0 40 if $line =~ /^\.
121 20 20 unless ($value)
126 0 40 if $key =~ /EXTENDED/
129 20 20 if $key and $value
132 40 0 if ($warnings_done) { }
0 0 elsif (not $warnings_done) { }
133 20 20 if ($key =~ s/^\.// and $value and $key) { }
20 0 elsif ($forecast_item) { }
143 0 20 if $value
150 0 0 if (not $key and $value) { }
0 0 elsif ($key and not $value) { }
213 2 0 if ($section)
220 8 38 unless $coverage_ended
221 20 26 unless ($line =~ /^\w/)
225 2 0 if $coverage =~ /$city/i and $section =~ /\d{4}/
231 0 0 if ($rawData =~ /Error/)
246 0 0 unless $coverage_ended
247 0 0 unless ($line =~ /^\w/)
251 0 0 if $coverage =~ /$city/i and $section =~ /\d{4}/
275 0 1 if $max_items
289 1 0 if $cols > $max_items
304 0 1 if (@$warnings)
357 0 3 unless $URL
361 3 0 unless ($UA)
363 0 3 if ($ENV{'HTTP_PROXY'} or $ENV{'http_proxy'})
372 3 0 if ($res->is_success) { }
387 3 0 if ($fileopt eq 'get' or $fileopt eq 'save')
388 0 3 if $main::opt_v
391 2 1 if ($fileopt eq 'save')
392 0 2 if $main::opt_v
393 0 2 unless open OUT, ">$filename"
399 2 1 if ($fileopt eq 'usefile')
400 0 2 if $main::opt_v
401 0 2 unless open FILE, $filename
454 0 1 if ($data =~ /Error/)
469 1 72 if /^\s*(\d+)(\d\d)\s+(AM|PM)\s+(\w+)/
470 1 0 if $1 and $2 and $3
471 1 72 if /^CITY/
472 1 72 if /^$city\s/
477 1 72 if $line
485 1 0 if ($fields =~ /TMP/ and $fields =~ /\sDP\s/) { }
501 1 0 if length $line < 64
503 0 1 unless $line and $fields
506 1 0 if $fields
515 0 1 if $values[3] eq 'NOT AVBL'
520 1 9 if $fields[$i] eq 'DP'
521 1 9 if $fields[$i] eq 'TMP'
544 0 1 if $$in{'ERROR'}
545 0 1 unless $$in{'CITY'}
575 1 0 if ($direction)
582 0 1 if ($$in{'WIND'} eq 'CALM') { }
587 0 1 if $gusts
593 1 0 if ($$in{'RH'})
596 1 0 if ($$in{'PRES'})
603 1 0 if ($direction)
608 1 0 if ($rh_pres) { }
616 1 0 if $rh_pres