Branch Coverage

lib/Weather/GHCN/Options.pm
Criterion Covered Total %
branch 66 72 97.2


line true false branch
580 8 116 if ($_opt_obj->country)
585 1 7 unless @cou
588 1 7 if @cou > 1
596 5 119 if ($_opt_obj->defined("active") and $_opt_obj->active eq $EMPTY)
600 26 98 if $_opt_obj->fmonth or $_opt_obj->fday
626 3 150 if $k eq "aliases"
627 6 144 if $k eq "cachedir"
628 6 138 if $k eq "profile"
630 89 49 unless defined $v
632 2 47 if ($boolean->{$k})
639 0 47 if ($val =~ /\A \s* \Z/msux)
664 9 115 if ($_opt_obj->defined("aliases"))
667 1 22 unless $alias_name =~ /$ALIAS_NAME_RE/u
672 24 100 if ($_opt_obj->active)
673 7 17 unless ($_opt_obj->active =~ / \A (18|19|20)\d\d [-] (18|19|20)\d\d /msux)
679 33 91 if ($_opt_obj->range)
680 7 26 unless ($_opt_obj->range =~ / \A (18|19|20)\d\d [-,] (18|19|20)\d\d /msux)
686 5 119 if $_opt_obj->defined("state") and not $_opt_obj->state =~ / \A [[:alpha:]]{2} \Z /msux
689 1 123 if $_opt_obj->partial and not $_opt_obj->defined("active")
695 9 115 if ($_opt_obj->range and $_opt_obj->active)
697 9 0 if ($bad_range_cnt == 0)
701 5 4 unless $r->subset($a)
706 3 121 if $_opt_obj->gps and not $_opt_obj->gps =~ / \A [+-]? \d{1,3} [.] \d+ (?: [[:punct:]] | \s+ ) [+-]? \d{1,3} [.] \d+ \Z /msux
714 0 124 unless defined $report
718 1 123 if $report and not $report_abbrev{$report}
728 0 124 unless defined $refresh
732 0 124 if $refresh and not $refresh_abbrev{$refresh}
743 124 0 if ($_opt_obj->defined("kmlcolor"))
745 1 123 if ($kmlcolor eq $EMPTY) { }
749 2 121 unless $color_abbrev{$kmlcolor}
755 15 109 if ($_opt_obj->defined("fmonth"))
756 5 10 unless rng_valid($_opt_obj->fmonth) and rng_within($_opt_obj->fmonth, "1-12")
761 15 109 if ($_opt_obj->defined("fday"))
762 5 10 unless rng_valid($_opt_obj->fday) and rng_within($_opt_obj->fday, "1-31")
791 35 196 unless ref $row eq "ARRAY"
793 63 133 if $type eq $BANG