Branch Coverage

blib/lib/Weather/OWM.pm
Criterion Covered Total %
branch 77 80 96.2


line true false branch
633 1 9 unless $args{'key'}
665 6 8 if not $args{'product'} or $args{'product'} eq "forecast"
668 1 7 if $args{'product'} and $args{'product'} ne "historical" and $args{'product'} ne "daily"
674 7 2 if ($args{'product'})
676 1 6 unless $args{'date'}
678 3 3 if ($args{'product'} eq 'daily') { }
3 0 elsif ($args{'product'} eq 'historical') { }
680 1 2 if $args{'date'} =~ /^\d+$/
682 2 1 if ($args{'date'} =~ /^(\d{4}-\d{2}-\d{2})/) { }
688 1 1 unless $args{'date'} ge "1979-01-02"
691 2 1 unless $args{'date'} =~ /^\d+$/
694 1 1 unless $args{'date'} >= 283999530
707 3 1 unless $args{'q'} or $args{'zip'} or $args{'city_id'}
719 3 4 unless $args{'q'} or $args{'zip'} or $args{'city_id'}
732 1 11 unless $args{$_}
735 1 3 if $args{'product'} eq "hourly" and not $args{'end'} and not $args{'cnt'}
738 10 8 unless $args{$_}
740 4 4 unless $args{$_} =~ /^\d+$/
750 1 9 if (defined $args{'lat'} and defined $args{'lon'}) { }
754 3 1 unless $args{'city'} or $args{'zip'}
765 2 3 unless $icon
767 2 1 unless $sm
775 1 1 if ($url)
777 1 0 if $res->is_success
789 22 21 if ($api eq "one_call" or $api eq "weather")
791 6 16 if $args{'units'} eq "standard"
792 20 2 if $args{'lang'} and $args{'lang'} eq "en"
807 10 10 $api eq 'history' ? :
7 20 $api eq 'weather' ? :
13 27 $api eq 'one_call' ? :
819 6 7 if defined $args->{'lat'} and defined $args->{'lon'}
822 0 5 unless @location
838 3 5 if $prod eq "hourly" or $prod eq "climate"
840 1 7 unless $products{$prod}
858 3 6 if $prod eq "hourly"
861 1 8 unless $products{$prod}
870 1 3 if $prod eq "historical"
871 1 3 if $prod eq "daily"
881 1 6 if defined $args{'lat'} and defined $args{'lon'}
889 92 21 defined $args->{$_} ? :