Branch Coverage

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


line true false branch
282 0 0 if $k0 eq $k1
293 0 0 unless defined $js
300 0 0 if defined $r
312 0 0 unless $score >= $best_score
316 0 0 if $self->opt('best_match_and_score', 0, $opt_hr)
329 0 0 unless @_ and defined $_[0]
330 0 0 if (ref $_[0] eq 'ARRAY') { }
331 0 0 if defined $x and $x eq $v
333 0 0 if defined $x and $x eq $v
348 0 0 unless $self->opt('q') or $self->opt('no_errors')
357 0 0 unless $self->opt('q') or $self->opt('no_warnings')
382 0 0 if ref $sensor_list eq 'ARRAY'
428 0 0 if ($self->opt('g', 0, $opt_hr))
432 0 0 if $self->opt('i', 0, $opt_hr)
434 0 0 if $self->opt('v', 0, $opt_hr)
463 0 0 if $conc > 500 or $conc < 0.05
465 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) { }
482 0 0 unless defined $sensors and ref $sensors eq 'ARRAY'
487 0 0 unless defined $hr
493 0 0 unless ($self->opt('now', 0, $opt_hr))
495 0 0 if (defined $stats_hr) { }
502 0 0 unless $self->opt('raw', 0, $opt_hr)
503 0 0 if defined $aqi
504 0 0 if defined $results_hr->{'temp_f'}
510 0 0 if @$aqi_ar > 0
515 0 0 if @temps
516 0 0 if uc $self->opt('temperature', 'F') eq 'C'
517 0 0 if $self->opt('i')
518 0 0 if $self->opt('temperature')
520 0 0 if ($self->opt('v', 0, $opt_hr) and @$aqi_ar)
522 0 0 if $self->opt('i', 0, $opt_hr)
523 0 0 if $self->opt('temperature')
538 0 0 if ($resp->{'success'}) { }
540 0 0 if defined $stash_path
551 0 0 if ($self->opt('average', 0, $opt_hr)) { }
578 0 0 if $ppm > $hi{'ppm'}
579 0 0 if $ppm < $lo{'ppm'}
587 0 0 if ($hi{'sensor'} and $n_sensors + $n_values > 3)
588 0 0 if $self->opt('d', 0, $opt_hr)
591 0 0 if ($n_sensors > 2) { }
594 0 0 unless abs $ppm - $high_ppm < $high_ppm * $self->opt('prune_threshold', 0.1, $opt_hr)
595 0 0 if $self->opt('d', 0, $opt_hr)
602 0 0 if $self->opt('d', 0, $opt_hr)
610 0 0 $have_pruned ? :
611 0 0 if ($lo{'sensor'} and $n_sensors + $n_values > $prune_threshold)
612 0 0 if $self->opt('d', 0, $opt_hr)
615 0 0 if ($n_sensors > 2) { }
620 0 0 unless not $ppm or abs $ppm - $low_ppm < $low_ppm * $self->opt('prune_threshold', 0.1, $opt_hr)
621 0 0 if $self->opt('d', 0, $opt_hr)
627 0 0 if $self->opt('d', 0, $opt_hr)