Branch Coverage

blib/lib/Weather/Meteo.pm
Criterion Covered Total %
branch 33 56 58.9


line true false branch
114 0 9 ref $_[0] eq 'HASH' ? :
116 1 8 if (not defined $class) { }
1 7 elsif (ref $class) { }
125 7 1 unless (defined $ua)
181 7 1 if (ref $_[0] eq 'HASH') { }
0 1 elsif (scalar @_ == 2 and builtin::blessed($_[0]) and $_[0]->can('latitude')) { }
0 1 elsif (ref $_[0]) { }
1 0 elsif (@_ % 2 == 0) { }
189 0 0 if ($_[0]->can("tz") and $ENV{'TIMEZONEDB_KEY'})
205 0 0 if (not defined $latitude and defined $location and builtin::blessed($location) and $location->can("latitude"))
210 0 6 unless (defined $latitude and defined $longitude and defined $date)
216 0 6 if ($latitude =~ /^\./)
219 0 6 if ($latitude =~ /^\-\.(\d+)$/)
222 0 6 if ($longitude =~ /^\./)
225 0 6 if ($longitude =~ /^\-\.(\d+)$/)
229 0 6 unless ($latitude =~ /^-?\d+(\.\d+)?$/ and $longitude =~ /^-?\d+(\.\d+)?$/)
233 0 6 if (builtin::blessed($date) and $date->can('strftime')) { }
5 1 elsif ($date =~ /^(\d{4})-/) { }
236 1 4 if $1 < 1940
242 0 4 unless ($date =~ /^\d{4}-\d{2}-\d{2}$/)
267 0 4 if (my $cached = $self->{'cache'}->get($cache_key))
274 1 3 if ($elapsed < $self->{'min_interval'})
283 0 4 if ($res->is_error)
291 1 3 if ($@)
296 3 0 if ($rc)
297 0 3 if ($rc->{'error'})
301 3 0 if (defined $rc->{'hourly'})
334 0 0 if (@_)