Branch Coverage

lib/Weather/PurpleAir/API.pm
Criterion Covered Total %
branch 0 110 0.0


line true false branch
284 0 0 if $k0 eq $k1
295 0 0 unless defined $js
302 0 0 if defined $r
314 0 0 unless $score >= $best_score
318 0 0 if $self->opt("best_match_and_score", 0, $opt_hr)
331 0 0 unless @_ and defined $_[0]
332 0 0 if (ref $_[0] eq 'ARRAY') { }
333 0 0 if defined $x and $x eq $v
335 0 0 if defined $x and $x eq $v
350 0 0 unless $self->opt("q") or $self->opt("no_errors")
359 0 0 unless $self->opt("q") or $self->opt("no_warnings")
384 0 0 if ref $sensor_list eq "ARRAY"
430 0 0 if ($self->opt("g", 0, $opt_hr))
434 0 0 if $self->opt("i", 0, $opt_hr)
436 0 0 if $self->opt("v", 0, $opt_hr)
465 0 0 if $conc > 500 or $conc < "0.05"
467 0 0 if ($conc <= 12) { }
0 0 elsif ($conc <= 35.4) { }
0 0 elsif ($conc <= 55.4) { }
0 0 elsif ($conc <= 150.4) { }
0 0 elsif ($conc <= 250.4) { }
0 0 elsif ($conc <= 350.4) { }
484 0 0 unless defined $sensors and ref $sensors eq "ARRAY"
489 0 0 unless defined $hr
495 0 0 unless ($self->opt("now", 0, $opt_hr))
497 0 0 if (defined $stats_hr) { }
504 0 0 unless $self->opt("raw", 0, $opt_hr)
505 0 0 if defined $aqi
506 0 0 if defined $results_hr->{'temp_f'}
512 0 0 if @$aqi_ar > 0
517 0 0 if @temps
518 0 0 if uc $self->opt("temperature", "F") eq "C"
519 0 0 if $self->opt("i")
520 0 0 if $self->opt("temperature")
522 0 0 if ($self->opt("v", 0, $opt_hr) and @$aqi_ar)
524 0 0 if $self->opt("i", 0, $opt_hr)
525 0 0 if $self->opt("temperature")
540 0 0 if ($resp->{'success'}) { }
542 0 0 if defined $stash_path
553 0 0 if ($self->opt('average', 0, $opt_hr)) { }
580 0 0 if $ppm > $hi{'ppm'}
581 0 0 if $ppm < $lo{'ppm'}
589 0 0 if ($hi{'sensor'} and $n_sensors + $n_values > 3)
590 0 0 if $self->opt("d", 0, $opt_hr)
593 0 0 if ($n_sensors > 2) { }
596 0 0 unless abs $ppm - $high_ppm < $high_ppm * $self->opt("prune_threshold", "0.1", $opt_hr)
597 0 0 if $self->opt("d", 0, $opt_hr)
604 0 0 if $self->opt("d", 0, $opt_hr)
612 0 0 $have_pruned ? :
613 0 0 if ($lo{'sensor'} and $n_sensors + $n_values > $prune_threshold)
614 0 0 if $self->opt("d", 0, $opt_hr)
617 0 0 if ($n_sensors > 2) { }
622 0 0 unless not $ppm or abs $ppm - $low_ppm < $low_ppm * $self->opt("prune_threshold", "0.1", $opt_hr)
623 0 0 if $self->opt("d", 0, $opt_hr)
629 0 0 if $self->opt("d", 0, $opt_hr)